When I run rxvt& (Rxvt v2.7.10 - released: 26 MARCH 2003) [which seems old, but is the version that ships with Fedora Core 24], I get an rxvt window with a font I find ugly.

When I do rxvt -font x however, I get the error message rxvt: can't load font "x", but then get an rxvt window with a slightly smaller font that I really like.

What unholy magic is this and how can I do the same thing without getting an error?

I do have rxvt mentioned in some of my .x* files, but nothing that mentions fonts:

  • In .Xdefaults, I have:
rxvt*background:        grey 
rxvt*foreground:        black 
rxvt*saveLines:         100 
rxvt*geometry:          80x53 
  • In .Xresources, I have:
rxvt*background:        grey 
rxvt*foreground:        black 
rxvt*saveLines:         60 
  • In .fvwm2rc, I have:
Style "rxvt"        Icon term.xpm, SloppyFocus, IconBox -70 1 -1 -140 
Style "rxvt"        MWMBorder, MWMButtons 

This is the file I suspect the most, but I don't see anything mentioning font.

NOTE: this has been bugging me for the last 20 years.

  • What's your question? Why the font changes or how you can change the font? Why do you use rxvt and not urxvt? – pfnuesel Nov 17 '16 at 23:56
  • My question is why "-font x" behavior is different from having no "-font" option at all. – barrycarter Nov 18 '16 at 0:31

rxvt uses "fixed" if the -font option fails. It does this in main.c:

xfont = XLoadQueryFont(r->Xdisplay, r->h->rs[Rs_font + idx]);
if (!xfont) {
    rxvt_print_error(msg, r->h->rs[Rs_font + idx]);
    r->h->rs[Rs_font + idx] = "fixed";
    xfont = XLoadQueryFont(r->Xdisplay, "fixed");
    if (!xfont) {
        rxvt_print_error(msg, "fixed");
        goto Abort;
r->TermWin.font = xfont;

The difference is because the default font is not "fixed" (an alias for a specific font), but something like


which is different from the actual "fixed"


(I used xfd -fn fixed to get the latter, but you could see this in /usr/share/X11/fonts/misc/fonts.alias).

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.