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 Thu 27 Nov 2014, 05:37
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 Posts_count  
Author Message
GustavoYz


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

PostPosted: Wed 14 Nov 2012, 15:58    Post_subject:  GNU Screen-4.0.3 + Vpatch + $TERM patch
Sub_title: 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   775 Time(s)

screen.jpg

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

screen_256colors.jpg


_________________


Edited_time_total
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1924
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_website MSNM 
ICQ 
GustavoYz


Joined: 07 Jul 2010
Posts: 897
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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0562s ][ Queries: 12 (0.0064s) ][ GZIP on ]