|
Bugzilla – Full Text Bug Listing |
| Summary: | add 256 color support for screen | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Marcus Rückert <mrueckert> |
| Component: | Other | Assignee: | Michael Schröder <mls> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | werner |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | terminfo entry | ||
|
Description
Marcus Rückert
2005-12-02 14:53:56 UTC
What about 256 color support in xterm?
AFAICS, this requires us to build xterm with "--enable-256-color":
--- xterm.spec.orig 2006-01-04 11:37:25.000000000 +0100
+++ xterm.spec 2006-01-12 23:13:13.000000000 +0100
@@ -105,7 +105,8 @@ xmkmf -a
make CCOPTIONS="$RPM_OPT_FLAGS"
pushd ../vttest-20050107
export CFLAGS=$RPM_OPT_FLAGS
- ./configure --prefix=/usr --mandir=%{_mandir}
+ ./configure --prefix=/usr --mandir=%{_mandir} \
+ --enable-256-color
make
popd
for i in *.bdf
Sieht schick aus. Es fehlen die termcap/terminfo-Einträge... Hmmm... xterm on a SuSE 9.1-i386 seems to have 256 colors. AFAICS from the package, it was still built within the XFree86 tree. The xtermcfg.h provided in xterm-simple.patch (in xterm-patches.tar.gz) has #define OPT_256_COLORS 1 This file seems to have been the result of a ./configure with --enable-256-color. This option must have been dropped when xterm was separated out of XFree86/xorg-x11. At least I can see no changelog entry explaining the change. Maybe --enable-256-color was simply forgotten (since the old configure call was not recorded in xorg-x11.spec) and it is OK to enable it again? Olaf, xterm is still built with 256 color support. /work/SRC/all/xterm/p_xterm-config.diff: [...] +#define OPT_256_COLORS 1 /* CF_ARG_ENABLE(256-color) */ [...] > pushd ../vttest-20050107 > export CFLAGS=$RPM_OPT_FLAGS > - ./configure --prefix=/usr --mandir=%{_mandir} > + ./configure --prefix=/usr --mandir=%{_mandir} \ > + --enable-256-color > make > popd You're talking about vttest, not xterm ... http://invisible-island.net/xterm/ http://invisible-island.net/vttest/vttest.html Oh, I see. Thanks. After compiling screen with --enable-colors256 and starting screen in an xterm
with
TERM=xterm-256color screen
this switches on 256 colors in screen windows (as can be seen e.g. by using
this test: xterm-208/vttests/256colors.pl).
elinks (-> mrueckert) can use these colors when its settings are set to
256 colors (Menu -> Setup -> Terminal options -> 256 colors).
So it is not necessary in all cases to have a screen-256color TERM-type.
Of course, we still should create screen-256color termcap/terminfo entries.
BTW, the number of colors is not defined in the termcap entries for either
xterm or xterm-256color:
--- termcap.xterm 2006-01-13 13:19:36.000000000 +0100
+++ termcap.xterm-256color 2006-01-13 13:19:10.000000000 +0100
@@ -1,17 +1,17 @@
-xterm|xterm terminal emulator (X Window System):\
+xterm-256color|xterm with 256 colors:\
:am:bs:km:mi:ms:xn:\
:co#80:it#8:li#24:\
:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
:K2=\EOE:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:\
:UP=\E[%dA:ae=\E(B:al=\E[L:as=\E(0:bl=^G:bt=\E[Z:cd=\E[J:\
:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:\
:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:do=^J:ec=\E[%dX:\
:ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:\
- :kP=\E[5~:kb=\177:kd=\EOB:ke=\E[?1l\E>:kh=\EOH:kl=\EOD:\
+ :kP=\E[5~:kb=^H:kd=\EOB:ke=\E[?1l\E>:kh=\EOH:kl=\EOD:\
:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:\
:me=\E(B\E[m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:se=\E[27m:\
:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:\
:ti=\E[?1049h:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\
:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:
Only terminfo has them:
od@blackberry:~> infocmp -d xterm xterm-256color
infocmp -d xterm xterm-256color
comparing xterm to xterm-256color.
comparing booleans.
ccc: F:T.
comparing numbers.
colors: 8, 256.
pairs: 64, 32767.
comparing strings.
initc: NULL, '\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\'.
kbs: '\177', '^H'.
kfnd: '\E[1~', NULL.
kslt: '\E[4~', NULL.
setab: '\E[4%p1%dm', '\E[48;5;%p1%dm'.
setaf: '\E[3%p1%dm', '\E[38;5;%p1%dm'.
setb: '\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m', '\E[48;5;%p1%dm'.
setf: '\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m', '\E[38;5;%p1%dm'.
The strings have been in xterm's termcap for a few years (I see it in 2003/10/10 - patch #180). vttest doesn't have a 256-color option. Fixed in STABLE. (maybe we should add screen-256color to the ncurses terminfo, though. CC werner) Most programs are using terminfo and not termcap. Beside this the termcap entries will be generated from the misc/terminfo.src as well as the entries in /usr/share/terminfo/. Therefore there is nothing todo. I wasn't talking about termcap. I was talking about adding a "screen-256color" terminfo entry in the ncurses package, which currently only contains 'screen' and 'screen-w'. Do you have an terminfo entry for screen-256color around? Created attachment 70687 [details]
terminfo entry
screen-256color terminfo entry
broken, no kbs ... please provide an entry like
screen-256color|VT 100/ANSI X3.64 virtual terminal with 256 colors,
colors#256, pairs#32767, use=screen,
It's not broken, this is how the screen terminfo entry looks since ages. kbs is not a mandatory field, and it is always wrong.
If you want an entry with 'use', use:
screen-256color|VT 100/ANSI X3.64 virtual terminal with 256 colors,
colors#256, pairs#32767, setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm,
use=screen,
Don't forget to change the spaces back to tabs...
Added to default list together with xterm-256color. |