FS#15837 - [screen] 256 color terminal not supported

Attached to Project: Arch Linux
Opened by Nick Hildebrant (nihildeb) - Thursday, 06 August 2009, 22:21 GMT
Last edited by Aaron Griffin (phrakture) - Monday, 10 August 2009, 18:31 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: it should be possible to set 'term screen-256color' in .screenrc to get 256 color support. I am told be the #vim guys on freenode that this should work.

There seems to be a similar bug reported in Ubuntu with the fix (build with --enable-colors256)
https://bugs.launchpad.net/ubuntu/+source/screen/+bug/87966

Terminfo seems to be correct:
[nihildeb@arch ~]$ tput -Tscreen-256color colors
256

There is a workaround here: http://frexx.de/xterm-256-notes/

# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"


Additional info:
* package version(s)
Name : screen
Version : 4.0.3-8

Name : ncurses
Version : 5.7-2.1

Name : pam
Version : 1.0.4-1

Name : vim
Version : 7.2.65-1.1

* config and/or log files etc.
[nihildeb@arch ~]$ cat .screenrc
term screen-256color


Steps to reproduce:
you can see the lack of color with a 256 color vim theme, but you can also use this perl script:
http://frexx.de/xterm-256-notes/data/256colors2.pl

forcing the .screenrc terminfo workaround above, you can see that the colors as they should be working
This task depends upon

Closed by  Aaron Griffin (phrakture)
Monday, 10 August 2009, 18:31 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Allan McRae (Allan) - Friday, 07 August 2009, 11:35 GMT
Screen is built with 256-color support and ships with the default screenrc provided by upstream. Adjust /etc/screenrc to your liking - it is in the backup array so pacman will not overwrite it.
Comment by Nick Hildebrant (nihildeb) - Monday, 10 August 2009, 18:26 GMT
  • Field changed: Percent Complete (100% → 0%)
Were you able to reproduce? My understanding is that term screen-256color should work? If I add this to the default screenrc in /etc, it doesn't work either.
Comment by Aaron Griffin (phrakture) - Monday, 10 August 2009, 18:31 GMT
Reopened this one solely so I could comment. Screen is built correctly, and we ship the 256 color terminfo entry with the ncurses package.

$ pacman -Qo /usr/share/terminfo/s/screen-256color*
/usr/share/terminfo/s/screen-256color is owned by ncurses 5.7-2.1
/usr/share/terminfo/s/screen-256color-bce is owned by ncurses 5.7-2.1
/usr/share/terminfo/s/screen-256color-bce-s is owned by ncurses 5.7-2.1
/usr/share/terminfo/s/screen-256color-s is owned by ncurses 5.7-2.1

Anything else is a configuration error. Ensure you're using a 256 color terminal in the first place. This works fine for me and has worked fine for the past 2 years (or whenever I added the screen-256color terminfo entry to our ncurses package)

Loading...