Subject: Screen and 256 Colors, again :)

From: Samer Atiani <[email-masked]>
Date: Wed, 22 Oct 2008 20:08:09 -0400

Hello,

I'm trying to get screen working properly with 256 colors (mostly so I can utilize my favorite VIM colorschemes), and so far I've done this successfully except that I've lost the ability to display bright/bold colors on the screen.

I've configured my screenrc like this:

attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=\E[48;5;%p1%dm:AF=\E[38;5;%p1%dm'
defbce "on"

An example of my problem: When I do 'ls' outside of screen, it would print each directory in a bright blue color. I ran 'script' and then ls, and here is an example of how it would output a directory called "etc":

^[[01;34metc^[[00m

Inside of screen, that same directory would be output like this:

^[[1m^[[38;5;4m^[[94metc^[[0m

How do I fix that? I notice if I screen did not print the leading ^[[1m (i.e. just ^[[38;5;4m^[[94metc^[[0m) then highlighting would work ok.

I'm using the GNU screen supplied with ubuntu hardy heron 8.10 on a 32 bit computer.

Thanks!
Samer

_______________________________________________
screen-users mailing list
[email-masked]
http://lists.gnu.org/mailman/listinfo/screen-users

---

From: [email-masked] (Trent W. Buck)
Date: Thu, 23 Oct 2008 15:12:01 +1100

> I'm using the GNU screen supplied with ubuntu hardy heron 8.10 on a 32

Ubuntu 8.04 has the codename Hardy.  Ubuntu 8.10 has the codename
Intrepid.

---

From: Erik Osheim <[email-masked]>
Date: Thu, 23 Oct 2008 14:56:12 -0400

> ^[[1m^[[38;5;4m^[[94metc^[[0m

You forgot to specify what terminal emulator (or terminal) you are
using. From my xterm, those two sequences display identically.

As I understand it, the "^[[1m" part should turn bold on until it is
turned off later by "^[[0m". Your terminal emulator may not correctly
be combining the various state-changes that the three initial escape
sequences specify.

I tested this from bash via:

printf "\033[01;34mfoo\n\033[00m"
printf "\033[1m\033[38;5;4m\033[94mfoo\n\033[0m"

It worked correctly inside of screen (attached to xterm). Screen's TERM
is 'screen-bce', and xterm's TERM is 'xterm'.

-- Erik