The time now is Sat 21 Apr 2018, 13:57
All times are UTC - 4 |
Author |
Message |
GustavoYz

Joined: 07 Jul 2010 Posts: 894 Location: .ar
|
Posted: Wed 14 Nov 2012, 15:58 Post subject:
GNU Screen-4.0.3 + Vpatch + $TERM patch Subject description: Make it support 256 color terminals. |
|
--------------------------------------------------------------
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 ).
--------------------------------------------------------------
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...
Luckily, found a patch somewhere that does the same I tried,
but better... As far as I know, it works fine.
TO COMPILE
Here will find the patched sources (vpatch + long $TERM names patch applied and already on the source).
Here and here will find both patches. To apply, extract source code, `cd` into that dir and run:
Code: | patch -p1 < longTerm_name_00.diff |
(may get some warnings with that one).
To compile it, I'd use:
Code: | ./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 |
but on some Puppies, u/rxvt may lack of OSC support.
Then `make install` or, if want to build pet package, install it on a new directory
Code: | make --DESTDIR=/root/screen-4.0.3 install |
and `dir2pet` it.
SCREEN 256 color test
If all is working and run this code from a screen session:
Code: | ( 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; ) |
should be able of see gradients between "xcolors" (requires tput).
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:
and to check $TERM, simply:
Added.
If want to see those suppoted colors with numbers:
Code: | perl -E 'say $_,`tput setb $_`," "x(`tput cols`-length("$_")),`tput sgr0` for 0..(`tput colors`-1)' |
Description |
|
Filesize |
42.33 KB |
Viewed |
1037 Time(s) |

|
Description |
For `gradients` I mean this. |
Filesize |
13.53 KB |
Viewed |
951 Time(s) |

|
_________________

Last edited by GustavoYz on Wed 21 Nov 2012, 21:51; edited 1 time in total
|
Back to top
|
|
 |
Iguleder

Joined: 11 Aug 2009 Posts: 2031 Location: Israel, somewhere in the beautiful desert
|
Posted: Fri 16 Nov 2012, 07:40 Post subject:
|
|
Awesome! Great work!
_________________ My homepage
My GitHub profile
|
Back to top
|
|
 |
GustavoYz

Joined: 07 Jul 2010 Posts: 894 Location: .ar
|
Posted: Fri 16 Nov 2012, 15:28 Post subject:
|
|
Thanks!
_________________

|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|