Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 15 Sep 2014, 00:27
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
GNU Screen-4.0.3 + Vpatch + $TERM patch
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
GustavoYz


Joined: 07 Jul 2010
Posts: 896
Location: .ar

PostPosted: 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 Twisted Evil ).
--------------------------------------------------------------
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
Luckily, found a patch somewhere that does the same I tried,
but better... As far as I know, it works fine.


TO COMPILE

Arrow Here will find the patched sources (vpatch + long $TERM names patch applied and already on the source).
Arrow 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).
Arrow 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:
Code:
tput colors

and to check $TERM, simply:
Code:
echo $TERM


Arrow 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)'
screen.jpg
 Description   
 Filesize   42.33 KB
 Viewed   614 Time(s)

screen.jpg

screen_256colors.jpg
 Description   For `gradients` I mean this.
 Filesize   13.53 KB
 Viewed   599 Time(s)

screen_256colors.jpg


_________________


Last edited by GustavoYz on Wed 21 Nov 2012, 21:51; edited 1 time in total
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1906
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 16 Nov 2012, 07:40    Post subject:  

Awesome! Great work! Very Happy
_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
GustavoYz


Joined: 07 Jul 2010
Posts: 896
Location: .ar

PostPosted: Fri 16 Nov 2012, 15:28    Post subject:  

Thanks! Very Happy
_________________

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

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
[ Time: 0.0755s ][ Queries: 13 (0.0286s) ][ GZIP on ]