Terminal font colors?

Todd Zullinger tmz at pobox.com
Sun Jul 15 17:57:12 UTC 2007


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070715/51d47d3f/attachment-0001.sig>


More information about the fedora-list mailing list