[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

256 colors support - [was: (no subject)]

From: cga2000
Subject: 256 colors support - [was: (no subject)]
Date: Tue, 09 Oct 2007 18:40:03 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Oct 09, 2007 at 01:33:41PM EDT, ara.t.howard wrote:
> On Oct 9, 2007, at 11:22 AM, cga2000 wrote:
> >
> >IIRC .. you first need to have a version of screen that supports 256
> >colors _and_ specify --enable-colors256 when you ./configure it prior
> >to compile.
> right.  the Portfile on OSX does indeed specify this option to configure

Not sure about OSX.  I have it working on a linux i386.

> >Another thing is that you are going to need to have screen point to a
> >terminfo entry that supports 256 colors.
> >
> >I do the latter with the following .screenrc statement:
> >
> >  term    "screen-256color-bce"
> >
> how odd, with that in my .screenrc i get the following error on startup:
> "TERMCAP", line 20, col 1, terminal 'screen-256color-bce': Illegal  
> character (expected alphanumeric or @%&*!#) - ^J

line 20 of your .screenrc or line 20 of the terminfo entry..?

>From the above, it sounds more like the latter.

Could this mean that the 'screen-256color-bce' terminfo entry is not
suitable in an OSX context?

> cfp:~ > cat .screenrc
> termcapinfo xterm ti@:te@
> defscrollback 4242            #Will be handled localy
> ###
> # terminfo and termcap for nice 256 color terminal
> # allow bold colors - necessary for some reason
> attrcolor b ".I"
> # tell screen how to set colors. AB = background, AF=foreground
> # erase background with current bg color
> defbce "off"
> term "screen-256color-bce"
> termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

If your term command specifies an adequate terminfo entry, you
shouldn't need a termcapinfo command.  Not sure about "AB=" or "AF="
and whether it's a tweak that's needed in an OSX context, but since
"screen-256color-bce" already specifies 'Co#256' you don't need to
specify it a second time.  

I vaguely remember having a termcapinfo command at some point in my
.screenrc when I was trying to get this to work but I no longer have
one.  My understanding is that it's a mechanism that quickly lets you
test changes w/o having to go through the hassle of compiling a terminfo
entry each and every time you make changes.

cf. "man screen"

> >Even if this turns out not to be necessary (?) to run your 256-color
> >test from a shell successfully, you will need a correct terminfo entry
> >for screen-mode apps that use it to determine the capabilities of the
> >underlying terminal anyway (mutt, vim, eg.)
> well i think that's okay since every works in straight iterm or  
> terminal, it's only under screen where things be hosed.

Well, yes.  That's because with screen there is an additional layer that
also has to be able to handle 256 colors.  In order to achieve this you
need a screen binary that supports 256 colors and a terminal definition
that tells applications on top of screen that they are running on a
256color-capable terminal.  

At least that's how I understand it.

Maybe it would narrow it down a bit if you could get it to work on a
linux PC .. and then see how this translates to OSX?

I run screen in an xterm and here's what I specify in my .screenrc:

# 256-color stuff
defbce  on                        # background color erase ...
term    "screen-256color-bce"     # adhoc terminfo entry

Hopefully someone who understands this stuff better than myself will
step in and take it from there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]