You are not logged in.

#1 2007-04-26 16:44:05

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Console colours differ when running screen; Ratpoison + urxvt = gaps

A couple of random questions.

First of all, does anyone know what would cause this difference in terminal colours when using urxvt vs urxvt-inside-screen ? Urxvt is on the left, urxvt running inside screen is on the right. The red colour in normal urxvt is orange in screen.

I'd like to fix this so that colours remain the same whether running urxvt inside screen or separately.

My .screenrc has 'term screen-256color', since the wiki recommended that - I'm guessing this is causing the problem, but reading the screen manual hasn't given me any clues as to what the 'term' value should be change to...

The second thing is, in the above screenshot you can see how urxvt windows running in ratpoison have gaps around them - is there any way to remedy this, with ratpoison gravity options or some similar config command?

Cheers.

- KD

Last edited by KomodoDave (2007-04-26 17:07:00)

Offline

#2 2007-04-26 18:07:08

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,329

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

Well I don't know about the colors (maybe try TERM=xterm or some other values inside screen if anything changes).
As for the gaps - they are there because the terminal windows resize only to multiples of character size, and so when they are maximized and your screen size is not a multiple of the char size, they leave a gap around. As a workaround, you can set the background color to be black - that way you won't see the gaps, and in ratpoison it doesn't make much difference what the background is anyway.

Offline

#3 2007-04-27 00:25:41

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

bender02 wrote:

Well I don't know about the colors (maybe try TERM=xterm or some other values inside screen if anything changes).
As for the gaps - they are there because the terminal windows resize only to multiples of character size, and so when they are maximized and your screen size is not a multiple of the char size, they leave a gap around. As a workaround, you can set the background color to be black - that way you won't see the gaps, and in ratpoison it doesn't make much difference what the background is anyway.

This is really weird... I definitely posted a reply hours ago, and have just noticed it got lost in virtual space...

Thanks a lot for that info, bender02; that's really handy. I'll configure some gravity options to get the window centered at least, then. Cheers for your aid smile

Anyone got any idea about the disparate colouring?

- KD

Offline

#4 2007-04-27 07:54:09

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

You can try adding this to your ~/.screenrc if you only work in a GUI:

term xterm

check out this thread for some fancy .Xdefaults and .screenrc tips (scroll down to find a screenrc...)


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#5 2007-04-27 11:04:26

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

klixon wrote:

You can try adding this to your ~/.screenrc if you only work in a GUI:

term xterm

check out this thread for some fancy .Xdefaults and .screenrc tips (scroll down to find a screenrc...)

Thanks for the link, klixon; there's some great info in there. Especially interesting is the initial bit about xterm settings in .Xdefaults being used by urxvt and aterm automatically.

- KD

Offline

#6 2007-04-27 13:30:39

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

terms and 256 colours are hit and miss...

make sure the theme you're using in VIM actually supports 256 colours, otherwise it could just be that urxvt is rendering them with your stock Xdefaults colours.

does this occur in other terms?

James

Offline

#7 2007-04-27 14:17:20

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

iphitus wrote:

terms and 256 colours are hit and miss...

make sure the theme you're using in VIM actually supports 256 colours, otherwise it could just be that urxvt is rendering them with your stock Xdefaults colours.

does this occur in other terms?

James

I've just tested in Xterm, and it happens there too. Oddly enough, the non-screen colour in Xterm is orange (urxvt = red), while the screen colour in Xterm is red (urxvt = orange). The shades of red and orange are not identical when comparing urxvt and xterm, yet all other colours are visibly identical in the two terminals.

Here's a screenie again, showing the following:

-------------------------------
| xterm | xterm + screen |
-------------------------------
| urxvt  | urxvt + screen  |
-------------------------------

I don't know how I check whether my Vim theme supports 256 colours... I'm using desert.vim . I had a look inside the file itself, and there were no clues as to the answer. I also tried ':he colors' and ':he cterm-colors', but there was no info on finding out the colour support.

- KD

Offline

#8 2007-04-27 17:22:35

nj
Member
Registered: 2007-04-06
Posts: 93

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

I had the same issue with my xterm and vim. Running vim in screen would give the correct colors from my Xdefaults, but without screen my orange and yellow would be different.

If I ran vim via 'vim -u NONE' so that my .vimrc was not sourced, and then used ':syntax on' in vim, my colors would be fine. If I then did ':set nocompatible' then ':color desert', my colors would be incorrect.

If I set TERM=screen, the colors would be fine regardless of the compatible setting.

I compiled a version of xterm without 88 and 256 color support, and everything worked fine with the normal TERM=xterm. I stuck with this 16 color xterm since I never use 256 colors.

Offline

#9 2007-04-27 17:31:18

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

nj wrote:

I had the same issue with my xterm and vim. Running vim in screen would give the correct colors from my Xdefaults, but without screen my orange and yellow would be different.

If I ran vim via 'vim -u NONE' so that my .vimrc was not sourced, and then used ':syntax on' in vim, my colors would be fine. If I then did ':set nocompatible' then ':color desert', my colors would be incorrect.

If I set TERM=screen, the colors would be fine regardless of the compatible setting.

I compiled a version of xterm without 88 and 256 color support, and everything worked fine with the normal TERM=xterm. I stuck with this 16 color xterm since I never use 256 colors.

Thanks for that info, nj. I'm sure there must be a solution to this, or a workaround... I remember asking exactly the same question about 18 months ago when I was last in Arch, and phrakture told me how to  fix it, I think. Sadly I can't find the relevant post now though, even by scouring every post I ever made under the name 'Komodo'.

EDIT: No, wait, I finally found the post, and I wasn't offered a solution after all =S

Any other suggestions for a fix, anyone?

- KD

Last edited by KomodoDave (2007-04-27 17:45:24)

Offline

#10 2007-04-27 22:05:18

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

ah, desert out of the box doesnt support 256 colours, so each term are interpreting it's colour definitions slightly differently.

Get yourself a copy of desert256, vibrantink, gardener or inkpot which all do 256 colours.

James

Offline

#11 2007-04-27 22:39:45

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Console colours differ when running screen; Ratpoison + urxvt = gaps

iphitus wrote:

ah, desert out of the box doesnt support 256 colours, so each term are interpreting it's colour definitions slightly differently.

Get yourself a copy of desert256, vibrantink, gardener or inkpot which all do 256 colours.

James

You're a hero, James! I got 'desert256-transparent', and it works like a charm; colours are identical with every screen and term combo.

Thanks loads; I appreciate it.

- KD

Offline

Board footer

Powered by FluxBB