Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 61265 - New /etc/bash/bashrc stuff breaks colour in xterm
Summary: New /etc/bash/bashrc stuff breaks colour in xterm
Status: VERIFIED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-22 09:25 UTC by Robert Moss (RETIRED)
Modified: 2004-09-08 09:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Moss (RETIRED) gentoo-dev 2004-08-22 09:25:54 UTC
From /etc/bash/bashrc:

use_color=false
safe_term=${TERM//[^[:alnum:]]/.}	# sanitize TERM

if [[ -f /etc/DIR_COLORS ]]; then
	grep -q "^TERM ${safe_term}" /etc/DIR_COLORS && use_color=true
elif dircolors --print-database | grep -q "^TERM ${safe_term}"; then
	use_color=true
fi

Now, I'm not entirely sure why this doesn't work. In a standard (non-X) terminal, colours work fine. However, in the above, TERM and safe_term both get set to xterm, I don't have a /etc/DIR_COLORS, the dircolors command outputs a line saying "TERM xterm", but colours still don't show. use_color is still set to false.

If anyone can shed any light on this I'd be most grateful. I really can't work it out.
Comment 1 Robert Moss (RETIRED) gentoo-dev 2004-08-22 09:37:12 UTC
Okay, turns out that despite my getting rid of /etc/DIR_COLORS, a zero-byte file returned in its place. Possibly thanks to a remerge of coreutils - I'm not sure. Can someone more au fait with coreutils please confirm or deny my suspicion?
Comment 2 Matthew Schulkind 2004-08-22 09:46:25 UTC
What version of bash do you have? Have you run through all the etc-update stuff?

My /etc/bash/bashrc does not reference /etc/DIR_COLORS at all, and I get colors just fine after deleting /etc/DIR_COLORS.
Comment 3 SpanKY gentoo-dev 2004-08-22 10:13:39 UTC
matthew: your bash is out of date, the latest one does refer to DIR_COLORS
Comment 4 Matthew Schulkind 2004-08-22 10:36:27 UTC
Somehow I just reemerged bash-3.0-r5 and got a different config file. I'm not really sure what's going on.
Comment 5 SpanKY gentoo-dev 2004-09-07 15:26:15 UTC
what version of coreutils do you have Robert ?
Comment 6 Robert Moss (RETIRED) gentoo-dev 2004-09-08 09:54:59 UTC
5.2.1-r2, and this problem is gone now in this version; this was the version I was originally using when I reported this, so this can be closed. Cheers... :-)