There is a "bug" on screen in general, about the termcap
entries on terminal with 256 colors (`$TERM too long`).
I checked the source code and the string length '20' is hard
coded somehow, so it cannot support 'rxvt-unicode-256color'
(just 21 chars
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
--------------------------------------------------------------
On one system, I tried to hack the termcaps (copied via
`infocmp` the old rxvt-unicode-256color' into a custom
'urxvt-256color', edit the /etc/termcap file, the terminfo
files for screen...) but not success.
Then I made the test of change those '20' values and worked
(supports my custom $TERM with 256 colors, non custom ones
too), no problems on color part, although it crashed several
times...
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Luckily, found a patch somewhere that does the same I tried,
but better... As far as I know, it works fine.
TO COMPILE
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
Code: Select all
patch -p1 < longTerm_name_00.diff
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
Code: Select all
./configure --prefix=/usr --with-sys-screenrc=/etc/screenrc --with-pty-mode=0620 --with-pty-group=5 --disable-socket-dir --enable-locale --enable-colors256 --enable-rxvt_osc && make
Then `make install` or, if want to build pet package, install it on a new directory
Code: Select all
make --DESTDIR=/root/screen-4.0.3 install
SCREEN 256 color test
If all is working and run this code from a screen session:
Code: Select all
( x=`tput op` y=`printf %$((${COLUMNS}-6))s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done; )
This perl script test it (nothing extra required for run it), and this one too (vim isn't neded, just Perl).
To check how many colors your actual terminal support, run:
Code: Select all
tput colors
Code: Select all
echo $TERM
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
If want to see those suppoted colors with numbers:
Code: Select all
perl -E 'say $_,`tput setb $_`," "x(`tput cols`-length("$_")),`tput sgr0` for 0..(`tput colors`-1)'