[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: screen with 256 color xterm
From: |
Jeremy Chadwick |
Subject: |
Re: screen with 256 color xterm |
Date: |
Thu, 19 May 2005 16:54:12 -0700 |
User-agent: |
Mutt/1.5.9i |
Michael,
Bingo -- you hit the nail on the head.
FreeBSD termcap (both 4.x and 5.x) contain the official xterm
declarations from Thomas Dickey. So, things there are adhering to
the man who knows best. However, all of them end up eventually
pointing to xterm-basic, which contains 'Co#8:pa#64'.
So, therefore, needed for FreeBSD (stating this for future people
who read the list; tested on 4.x and 5.x both):
1. ports/misc/screen needs to be recompiled with -DCOLORS256. I'm
going to submit a PR to add a WITH_XTERM_256 tweak so that folks can
just build the port via WITH_XTERM_256=true. Should be a 3 line
port Makefile change.
2. $HOME/.screenrc needs the following:
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
After this, everything works beautifully while inside screen. :-)
Thanks for pointing me in the right direction, Michael. I hope other
list users find this information useful as well.
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. |
On Fri, May 20, 2005 at 12:02:37AM +0200, Michael Schroeder wrote:
> On Wed, May 18, 2005 at 03:47:58PM -0700, Jeremy Chadwick wrote:
> > Using TERM=xterm-256color does not fix it, as expected, as I believe
> > the problem to be with screen and not the environment. :-)
> >
> > I'll repeat myself: using TERM=xterm works fine outside of screen,
> > yadda yadda. I've even bothered to try some custom .screenrc hacks
> > using termcapinfo, thinking some of the extra parameters need to be
> > defined (AB=ESC[48;5;%dm and AF=ESC[38;5;%dm) -- doesn't fix it.
>
> Does your termcap entry for xterm contain Co#256? That's how screen
> detects if your terminal supports 256 colors. Maybe adding
>
> termcapinfo xterm Co#256
>
> does the trick for you. (Of course you might need AB/AF as well).
> Note also that the xterm termcap entries that ship with the xterm
> program contain:
>
> # These aliases are for compatibility with the terminfo; termcap cannot
> provide
> # the extra features, but termcap applications still want the names.
> x1|xterm-16color|xterm alias:tc=xterm-xfree86:
> x2|xterm-88color|xterm alias:tc=xterm-256color:
> x3|xterm-256color|xterm alias:tc=xterm-xfree86:
> xn|xterm-nrc|xterm alias:tc=xterm:
> xr|xterm-rep|xterm alias:tc=xterm:
> xx|xterm-xmc|xterm alias:sg#1:tc=xterm:
>
> In other words, they don't support the color codes. But maybe your
> termcap contains different entries.
>
> Cheers,
> Michael.
>
> --
> Michael Schroeder address@hidden
> main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
>
>
> _______________________________________________
> screen-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/screen-users