I've got a curious hardware situation, and I've run into a curious software quirk. I have a laptop with a broken screen that I have hooked up to an external display. I start up an X session and open a urxvt terminal. With the setting URxvt.letterSpace: -1 in my Xresources file, the text in my terminal displays like this:

Normally spaced text in urxvt

Now I don't want the broken built-in screen still on, so I disable it with the line:

xrandr --output LVDS1 --off 

If I open a new terminal now, the text will appear as it does above. But after logging into /dev/tty2 and then coming back to my graphical X session and opening up a new terminal, the text displays like this with the letter-spacing much tighter than before:

Much tighter text in URxvt

Reloading my Xresources file doesn't fix this. But increasing the value of URxvt.letterSpace from -1 to 0 and then reloading does appear to return the letter-spacing to what it was originally, so it seems that somewhere, after logging into /dev/tty, an extra -1 is being added to my letter-spacing.

Why does this happen? Why does going into a /dev/tty decrease the letter-spacing like this?

  • 1
    Is this reproducible? Is letterSpace set to -1 every time you switch to /dev/tty2? – Dmitry Grigoryev Mar 29 '17 at 17:14
  • It doesn't seem to happen every time, but I'm not sure what I'm doing in /dev/tty that triggers it. The only way I've figured out to reset this effect is to restart the computer (maybe just restart the Xsession?). I'll play around and reply if I discover more concrete steps to reproduce this. – Mike Pierce Mar 29 '17 at 17:24
  • And it doesn't appear that the value of letterSpace is actually being changed with this happens. The value of URxvt.letterSpace is -1 in both of those images in the question. It looks like another -1 is getting added somewhere for some reason. – Mike Pierce Mar 29 '17 at 17:24
  • @DmitryGrigoryev , I've made discovery. I'll add details in the post. – Mike Pierce Mar 29 '17 at 17:39
  • Sounds kind of like display driver weirdness, which acts like deep magic from normal userspace's perspective (my usual fix for problems along these lines is "update kernel and try again"; it sometimes works). – Tom Hunt Mar 29 '17 at 20:53

Do you have any font settings in .Xdefaults?

Add (or remove) lines in .Xdefaults to specify a font and size.

! -- Fonts -- !

There may be several in the .Xdefaults file that the system picks from. Remove or comment out the ones you don't want or add the one you do.

This helped me set a particular size and font for my X sessions in the past.

|improve this answer|||||
  • Nope. I had deleted .Xdefaults so that only .Xresources is read from. – Mike Pierce Jan 15 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.