You are not logged in.
Hey all,
I'm new to Arch -- so far I've been really enjoying it. I had one quick question though, what's the deal with emacs and vim losing color in an X terminal (both xterm and gnome-terminal)? I've got colors showing up as bolded instead of the appropriate color.
Dir colors works just fine however, so I'm a little bit perplexed In the console both the aformentioned editors work as expected.
Thanks,
- Scott
Offline
I've experienced this too. The strange thing is, the colors do show up when I start screen and then run the coloured applications. :?:
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
add to your ~/.bashrc the following line :
TERM=xterm-color
Offline
z4ziggy, thanks -- that works great.
Offline
add to your ~/.bashrc the following line :
TERM=xterm-color
I had the same problem. Now it's working fine. Shouln't this be the default?
Offline
Seems it has been filed into flyspray some time ago already.
Offline
I don't think it could really be in the default bashrc, as xterm-color causes other problems depending on the terminal. IIRC, it causes problems with the HOME and END keys in some terminals, and confuses Konsole to no end.
More sensible would be if xterm set the terminal when it was opened.
Dusty
Offline
Dusty is right, .bashrc is not the right place to put this. This is what the .Xdefaults file is for. Go ahead and create the file in your home directory if needed (note the capital X), and add this line to the file:
xterm*termname: xterm-color
From now on, when xterm is loaded, it sets the $TERM variable properly, thus enabling colour in vi and emacs. If you use another terminal emulator, open up the man page and look for the RESOURCES section to see if it supports the .Xdefaults file and termName variable. I myself use rxvt-unicode, and setting "Rxvt*termName: rxvt" has a similar effect to the above.
Offline
[...]More sensible would be if xterm set the terminal when it was opened.
That's exactly what I do:
xterm -fa andale -fs 12 -bg black -fg white -geometry 80x25 -tn xterm-color -sl 1000
Offline
I don't think it could really be in the default bashrc, as xterm-color causes other problems depending on the terminal. IIRC, it causes problems with the HOME and END keys in some terminals, and confuses Konsole to no end.
More sensible would be if xterm set the terminal when it was opened.
Dusty
Use xterm-xfree86 instead of xterm-color. That fixes HOME and END keys so I think this could be the default setting.
Offline
paranoos and dusty have both stated the "correct" way to handle this issue.
Which kind of sucks since I figured it out for myself earlier this week with rxvt. =P
Offline