I'd like to change the colors. The lime green hilighting on pale blue colored file names is killing my eyes.

I'm not sure if I'm using xterm or gnome or whatever, but I would like to change the default color scheme (preferable to something less offensive to my corneas) and have it stay changed (update my user profile).

Colors are nice, but sometimes it makes the text unreadable. I would settle for having no colors, standard B&W, if I can't have nice colors.

link|improve this question

60% accept rate
feedback

2 Answers

You'll need to configure your LS_COLORS export in your ~/.dir_colors (system wide at /etc/dir_colors)

See here for documentation: http://manpages.ubuntu.com/manpages/karmic/man5/dir_colors.5.html

::EDIT::

To make it stick:

  1. append this to your ~/.bashrc
    if [ "$TERM" != "dumb" ]; then
    [ -e "$HOME/.dir_colors" ] && 
    DIR_COLORS="$HOME/.dir_colors" [ -e "$DIR_COLORS" ] 
    || DIR_COLORS="" 
    eval "`dircolors -b $DIR_COLORS`" 
    alias ls='ls --color=auto'

  1. create/edit your ~/.dir_colors

  2. Then force a read of your .bashrc file with:

    $:source ~/.bashrc

  3. Everything should be pretty.

link|improve this answer
How would I go about setting ~/,dir_colors to be loaded on login? Is there any way to load a profile of colors? I can't match colors to save my life. – Josh K May 1 '10 at 5:21
See edit in comment. – Dave Rickman May 1 '10 at 7:16
According to the man page you linked to, those files are ignored by GNU dircolors. On Ubuntu, your ~/.bashrc file should have a line like eval "dircolors -b`". You could try changing it to eval "dircolors -b ~/.dir_colors" and create that file by doing dircolors -p > ~/.dir_colors then edit it to change particular file types. – Dennis Williamson May 1 '10 at 7:29
What files? .bashrc is your user-configurable bash shell. .dir_colors is your user configurable file for dircolors. Making it stick via the .bashrc file is going to be the only way to have it stick with every login unless you go global for everything. In which case, I don't want your pink directory colors. – Dave Rickman May 1 '10 at 8:59
"/etc/DIR_COLORS (Slackware, SuSE and RedHat only; ignored by GNU dircolors(1) and thus Debian.) System-wide configuration file." (it says the same thing for ~/.dir_colors) However, your code above (and the code in my comment) takes care of this. – Dennis Williamson May 1 '10 at 12:05
show 3 more comments
feedback

Assuming you're using gnome-terminal, you can select Edit > Profiles... and select the profile that's current (e.g. Default) and click Edit (or click New and enter the name of a new profile - if you do this then you'll need to later set it as the "Profile used when launching a new terminal"). Now you can click on the Colors tab where you can set the background and foreground colors and manipulate the color palette (including selecting among built-in schemes).

You might try the White on black foreground/background scheme and the Tango palette (which has colors that are a bit muted).

link|improve this answer
If he is running the server edition, then there shouldn't be a desktop environment. – Dave Rickman May 1 '10 at 7:18
@freedom_is_chaos: But he mentions xterm and "gnome". – Dennis Williamson May 1 '10 at 7:31
I figured he was guessing more at what shell he is running rather than program because he was running the server version. – Dave Rickman May 1 '10 at 9:01
There is no desktop environment, I only mention xterm and gnome because those are various references to things I found in my search for this. – Josh K May 1 '10 at 12:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.