[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Terminal font colors?



Bob Goodwin wrote:
> Thanks for the help but in my case it seems things are a bit
> different since I use XFCE rather than Gnome.

The settings aren't really dependent on using Gnome or XFCE.  The main
thing to check is what the value for the TERM environmental var is set
to.  If it is set to xterm, then the colorls.sh script that is sourced
by bash on startup is going to use /etc/DIR_COLORS.xterm instead of
/etc/DIR_COLORS.

Here's the relevant section from /etc/profile.d/colorls.sh:

COLORS=/etc/DIR_COLORS
[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"

Use "echo $TERM" to see what your terminal has set TERM to.  I don't
want to change the system-wide setting, so I choose to put my colors
in ~/.dircolors.  Since that is checked after the system-wide files
are checked and I don't have a ~/.dircolors.$TERM, I get the same
colors for both consoles and terminals.

The default /etc/DIR_COLORS enables bold, so when I copy it to
~/.dircolors and then source /etc/profile.d/colorls.sh, my colors now
include bold.  Does that not work the same in your case?

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Plagiarism saves time.

Attachment: pgpmSDYYInoV6.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]