Comment 18 for bug 87966

Revision history for this message
Jason Cohen (kryojenik) wrote :

The TERM variable in screen it TERM=screen or TERM=screen-bce. If you are doing the defbce as above screen is smart enough to set the TERM to screen-bce. However, the screen and screen-bce terminfos are 8 Color terminals. So when you run ncurses apps they will look at the terminfo capabilites and see you are an 8 color terminal.

You can set term screen-256color-bce in your screenrc to set this correctly (at least in karmic). That terminfo exists and is a 256 color terminal (as is screen-256color).

Or you can set in the command line to screen.

screen -T screen-256color. Again, if you hace defbce set in screenrc screen will add the -bce to the term for you.

Ultimately it would be nice for screen itself to check if the term supports 256 colors and then set an appropriate TERM based on that.

or if in a script, you can check you hosting terms capabilities...

[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors) -eq 256 ] && SCREEN_TERM="-T screen-256color"
screen $SCREEN_TERM

When connecting from putty or SecureCRT send xterm-256color to get a host terminfo that supports 256 colors.