screen-users
[Top][All Lists]
Advanced

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

Re: screen-256color terminfo entry?


From: Stephane Chazelas
Subject: Re: screen-256color terminfo entry?
Date: Thu, 25 May 2006 17:16:44 +0100
User-agent: mutt-ng/devel-r562 (Linux)

On Fri, May 19, 2006 at 01:55:59PM +0200, Alain Bench wrote:
> Bonjour Stéphane,
> 
>  On Tuesday, May 9, 2006 at 8:05:43 +0100, Stéphane Chazelas wrote:
> 
> > Here is what I have. This is screen entry with some xterm specific
> > keys and features added (note that the name "screen.xterm-256color" is
> > too big for some curses implementations).
> 
>     And given it provides 256 colors in Screen, the entry should
> probably be named yet longer "screen-256color.xterm-256color"... :-)

Well, screen.xterm-256color lets screen select it automatically.
That was the point.

> > Also, the color pair should be 65536, but some applications bug if you
> > put something above 256 (typically debian "aptitude" and terminfo
> > doesn't support anything above 32767 (uses signed shorts)).:
> 
>     Each and every official 256 colors terminfo entry has "pairs#32767".
> Namely xterm-, rxvt-, putty-, and gnome-256color. Does it really bug?

Yes, that's incorrect, that should be 65536, but there's a
limitation in terminfo (the unsigned short thing, that prevents
it from working).

Anyway, applications shouldn't need that. As setaf, setab (ANSI
colors) are defined, applications should use that and know that
the number of pairs is colors^2. There's not much standardised
anyway.

Debian aptitude bugs. It can't support more than 256 color pairs
supports only ansi type color settings but insists in getting
the color pair number from terminfo and do some unclean thing
with it.

> > screen.xterm-256color|VT 100/ANSI X3.64 virtual terminal, 
> 
>     "GNU Screen inside Xterm with 256 colors"?

Yes. I don't know of any application that uses that field
though.

> >|    ccc, 
> >|    
> >initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
> > 
> 
>     Unfortunately customizing color palette doesn't work: This escape
> sequence is filtred by Screen and never reaches Xterm. "tput initc 4
> 1000 200 600" doesn't change blue to rose. You should either remove
> ccc/initc, or find a way to open a hole in Screen's barrier.

Ok, thanks for pointing this out. I thought screen would let the
escapes it doesn't know through. screen would need to catch
those sequences anyway and record the values of the color
settings for each window and change the whole color pallette
when switching from window to window, which doesn't sound
reasonable, to truly support initc.

There's probably a lot more other things that are irrelevant as
well in the entry I came up with.

So Nikolai's screen-256color is the best approach, as it is
terminal independant and is just what it says: a screen where
the 256 color support is advertised (on terminals without 256
colors, screen translates the colors) as screen does support 256
colors while it doesn't support redefining colors.

For screen.xterm-256color, bce could be set to true for
optimisation and the keys not supported by screen could be added
(the F13...).

There is probably more that can be added though, as I suspect
there are some terminfo only capabilities that are missing in
the entry as screen is more termcap oriented.

> 
>     For screen.putty entry I've just done the later, enclosing the
> needed sequence in between \EP and \E\\, and it works like a charm. But
> for Xterm there is a problem with \E\\: I don't know how to send ESC \
> to the underlying terminal, or if \007 would do it.
[...]

Yes, \007 would do it.

initc=\EP\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X^G\E\\

But again, that may not be a good idea, as one initc in one
window would change the colors in every window in every terminal
that screen session is attached to.

-- 
Stephane




reply via email to

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