On Sun, May 11, 2008 at 03:59:17AM +0200, Jesus Sanchez wrote: > Stuart Henderson escribis: >> On 2008-05-10, Jesus Sanchez <[EMAIL PROTECTED]> wrote: >>> I have set an alias for ls='colorls -GF' (color output) and this causes >>> the problems on a screen session. I have set the TERM="xterm-color" on >>> my /etc/profile. >> >> Why do that? That will override the correct terminal configuration >> and send control codes suitable for an xterm to terminals that can't >> handle it, like screen. > > So, what TERM variable should I use?
You should (almost) never set TERM manually. (You should probably also restrict personal changes to ~/.profile, not /etc/profile.) If you want to have color on the console, change ttyC* from "vt220" to "wsvt25" in /etc/ttys. If you want to have color in an xterm, add the following to ~/.Xdefaults: XTerm.termName: xterm-free86 Or, if you use the "rxvt" port, Rxvt.termName: rxvt Other terminal emulators have their own options. See their documentation for details. Once TERM is set properly (you will need to log out/restart X), you can start screen. screen will use the TERM it finds, and set TERM=screen (and TERMCAP to some value depending on the TERM it found). You should now have color, both on the console and in an xterm. Note that using "wsvt25" and "xterm-xfree86" is documented in the description for the "colorls" package. (The rest is, admittedly, a little harder to find.) Joachim -- TFMotD: mailwrapper (8) - invoke appropriate MTA software based on configuration file