You are not logged in.
I started to use screen and I'm having some problems with shuffled colors. I think a screenshot is best to describe the problem:
What can I do else besides setting the hopefully correct term and terminfo in .screenrc?
Thanks
Dennis
EDIT: I did not look properly. They're not shuffled, they're completely wrong.
Solution: Set terminal type to rxvt-256color (must be under /usr/share/terminfo).
Last edited by stb (2007-03-22 12:54:50)
Offline
I also use screen with urxvt, and I'm fairly certain my colors display correctly.
If you post that showcolors script, I can verify.
As far as terminfo I think screen recognizes rxvt, but not urxvt so try adding this to your ~/.Xdefaults:
URxvt*termName: rxvt
That should cause urxvt to report itself as rxvt when terminfo is requested.
If you do try that, make sure you open a new terminal to see whether it has any effect.
I know I added that to my .Xdefaults a while ago, and I think it addressed some issue in screen, but I can't remember what it was.
Last edited by veek (2007-03-22 00:26:30)
Offline
The problem is your screen terminfo doesn't support 88 colors. It supports 16. Try setting:
term screen-256color
in your screenrc. There is no screen-88color, but screen tends to Do The Right Thing with color numberings
Offline
URxvt*termName: rxvt
This restricted my urxvt to 16 colors :-).
I hacked screen a bit and found a function named color256to88():
#ifdef COLORS256
int
color256to88(jj)
int jj;
{
int r, g, b;
if (jj >= 232)
return (jj - 232) / 3 + 80;
if (jj >= 16)
{
return jj;
/*
jj -= 16;
r = jj / 36;
g = (jj / 6) % 6;
b = jj % 6;
return ((r + 1) / 2) * 16 + ((g + 1) / 2) * 4 + ((b + 1) / 2) + 16;
*/
}
return jj;
}
#endif
The purpose of this function is to remap the color codes from 6x6x6 color cube (256 colors) to 4x4x4 color cube (88 colors). That is, when you set the term to 'screen-256color' in .screenrc it is possible to use color codes from 0 .. 255. The drawback is they get mapped to 0 .. 88, so you gain nothing but have to rewrite all of your color configurations.
I edited the function not to remap the codes as you can see. Now it works as I want but can this feature be enabled without editing the source? It would be very interesting for me to know if you use only colors less than 88 or do you use the whole range up to 255?
Offline
I just use 256 colours, vim, screen, xterm, urxvt and even rxvt support it.
What advantage is there to use 88 instead of 256?
James
Offline
What advantage is there to use 88 instead of 256?
None. But how do I setup 256 color mode in urxvt itself, so that I can use the same colorings both under screen and urxvt?
Offline
I thought urxvt had 256 colour mode, but googling tells me otherwise. I use xterm myself, as I had font isues in urxvt, so I can't say for sure.
You could try URxvt*termName: rxvt-256color, see how that goes, along with the screen config option that was mentioned above by phrak.
James
Offline
My hero! That did it! Now screen displays the colors "correct". And again, I learned something about the terminfo stuff. Is it right to say that you did a find /usr/share/terminfo/| grep 256 to find this terminal type?
Offline