Take the 2-minute tour ×

I upgraded from Ubuntu Oneiric 11.10 to the RC of Ubuntu Precise 12.04. After the upgrade, borders appear which I cannot get rid of.

This shows rxvt-unicode's background set to red and Vim background set to blue. screen shot of the issue

On Oneiric 11.10 there was no red border, and Vim was the full width/height of the terminal window.

This appears to be an rxvt-unicode issue as gnome-terminal wraps Vim without borders.

I've tinkered with URxvt.font, setting both pixelsize and just size, but neither has any effect.

I've tried starting Vim with -u NONE -X to confirm it's not a plug-in issue as well as running rxvt-unicode with its defaults. Neither had any result.

As far as I can tell, the version update between Oneiric (was 9.12) and Precise (is 9.14) (cannot link to Ubuntu packages due to reputation) is only minor. I've looked at the 9.14 Changelog, but there wasn't anything too suspicious apart from:

  • fix alignment of inherited root pixmap when it is a different size than the root window and the terminal window is off the left or top edge (Mikachu).

Has anyone else encountered this in rxvt-unicode? Is there a workaround?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

This is a bug fix in 9.14:

  • fix a redraw bug that occurs when a bg pixmap is set and the wm does not honour the size hints set by urxvt. Now urxvt forces the size of the terminal window to be a multiple of the cell size.

When the terminal size in pixels is not an even multiple of the individual character size ("cell size"), there will necessarily be unused space somewhere (bottom and right, in this case). I can only assume that this was originally thought of as something that "shouldn't happen" (try to resize a terminal window and you'll see that it only resizes to even multiples of the cell size (or at least it should)), but when some WMs e.g. maximize the window, it does indeed happen.

urxvt used to just keep this area "blank" (as the terminal background), but that resulted in a bug when resizing the window in e.g. Awesome which left cruft in these no-man's-land borders (see http://awesome.naquadah.org/wiki/Urxvt_Hints). Now this is taken care of by letting urxvt's borders fill this gap.

To mitigate the problem you could set the border color to something less eye-catching than clear red or make sure that the window is an even multiple of the cell size. The biggest question with your image seems to be: why is your terminal pixel size not a multiple of the cell size? This in itself might be a bug somewhere. Try resizing and finding out why this is.

share|improve this answer
In Precise, the rxvt-unicode window only resizes in fixed steps, likely the pixelsize set in the config file for URxvt.font. Whatever the window size, there is always a border around it. The 'red' and 'blue' colours were chosen for this screengrab only, they default to black otherwise, but it's still very noticeable. –  StanAngeloff Apr 23 '12 at 8:20
@StanAngeloff: Try to set urxvt border-width to 0, i.e urxvt -b 0. I guess this is a WM issue where its borders are not taken into account when calculating terminal size. –  Daniel Andersson Apr 23 '12 at 8:27
Thank you, -b 0 resolved it. I placed it in my .Xresources as URxvt.internalBorder: 0 and it's not an issue any more. I wonder if I should report this, seems odd to be broken as a default behaviour on Ubuntu. –  StanAngeloff Apr 23 '12 at 8:34
@StanAngeloff: yes, report it against rxvt-unicode in Ubuntu. I guess the issue is really in the WM, but to tie it to rxvt-unicode will probably get the right people's eyes on it, at least. –  Daniel Andersson Apr 23 '12 at 8:45

Your Answer


