screen-users
[Top][All Lists]
Advanced

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

Re: screen, 256color mode and ssh


From: Alain Bench
Subject: Re: screen, 256color mode and ssh
Date: Tue, 29 Jan 2008 14:43:03 +0100 (CET)
User-agent: Mutt/1.5.13 (2006-11-28)

Hello Trent,

 On Saturday, January 26, 2008 at 10:43:17 +1100, Trent W. Buck wrote:

> Here are some notes I made on the subject a few years ago.

    Nice document, bravo! I'll comment a couple details about the
screen-256color terminfo entry:

>       ccc,
>       
> initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,

    Customizing the color palette (ccc+initc) can't work:

 - Screen doesn't support that itself.
 - This initc string is Xterm-specific, it won't work on other 256 color
teminals.
 - Anyway Screen filters out this escape sequence, it will not reach the
real terminal.

    An Xterm-specific solution exists, suitable for a TERM=screen.xterm
specialized entry: Replace the final \E\\ by ^G (an alternative Xterm
end-sequence mark), and then enclose the whole resulting string in
between \EP and \E\\ (opens a hole in the Screen barrier) so that Screen
lets the inner part reach Xterm. The string must end in %2.2X^G\E\\, to
be more clear.

    But for a generic screen-256color entry portable across all
terminals: No way. Just remove ccc and initc.


>       setb=\E[48;5;%p1%dm, setf=\E[38;5;%p1%dm,

    Those non-ANSI commands are expected to use a different color order,
which does not match the ordering of the palette that any 256 color
terminal has by default. Nearly all applications prefer setab/setaf,
which use the normal ANSI color ordering. But some rare apps could be
fooled by setb/setf doing unexpected colors. Remove them, or yet better
annihilate them by writing "setb@, setf@," (this makes sure they are not
imported by a use= statement).


> tic ~/.terminfo/terminfo.src

    The tic -x option is required, otherwise some extended informations
are lost.


    Also note that since 2006-10-07, the official terminfo database
includes a screen-256color entry and some variations around (BCE or not,
status line or not, 16 or 256 colors). If it's not yet installed (maybe
together with Ncurses 5.6), one can download the big source file, and
compile a single given entry via:

| $ tic -x -e screen-256color-bce terminfo.src

    ...or upgrade the whole system database as root (¡¡BACKUP FIRST!!):

| # tic -x terminfo.src

    Such upgrade also provides konsole-256color, rxvt-256color,
gnome-256color, putty-256color, and xterm-256color. Those are needed
outside of Screen, and before one can properly start Screen with
256 colors.


Bye!    Alain.
-- 
TERMCAP?
See the archives for more discussion on why this should,
like hydrogen for dirigibles, be relegated to the past.
        PCC DTG on MU. © August 2004.




reply via email to

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