XTerm is seemingly ignoring .Xresources font size

8,319

Solution 1

The application settings override the Xresources (or .Xresouces), You should look into /etc/X11/app-defaults/XTerm to change the fonts permanently. The SimpleMenumenuLabel.font is for the menu itself, the others look like

 *fontMenu*font2*Label:  Tiny
*VT100.font2:           5x7

or

*VT100.utf8Fonts.font2: -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1
*VT100.utf8Fonts.font:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1

You can change the values to any font listed in the

xlsfonts

command, but restricting yourself to fixed fonts tends to work better. All the fonts like 5x7 are fixed, five pix wide, seven high, so it's easy to pick a bigger one. The longer names have a size embedded in the name, (first number), with a resolution like 75-75 or 100-100. Try out several at a time on the available font2-6. The new machine might have a different resolution which makes the same setting look smaller than the old one.


5x7 is the smallest standard font of that group, if it's too big, you probably have a resolution problem. Check the resolution of your display (DASH/Settings(gear)/Displays). If it is smaller than before, maybe you need to (re)install any proprietary video drivers.

Solution 2

The .Xresources file is not loaded by the application directly. Instead, the X server loads this file, and then the applications query the resources from the server.

To merge the .Xresources into currently running X session, you can use

xrdb -merge ~/.Xresources

Not sure if they are read by default on X session startup; if not — try putting this command into your session startup script (e.g. .xinitrc if it's used in your DE).

Further reading: X resources page at ArchWiki.

Share:
8,319

Related videos on Youtube

TmRa5O4ef
Author by

TmRa5O4ef

Updated on September 18, 2022

Comments

  • TmRa5O4ef
    TmRa5O4ef over 1 year

    I'm having some strange issues with regards to XTerm font sizes since the Xenial update.

    The actual content of the terminal (prompts, output, etc) appear excessively large, and I can't adjust them at all via .Xresources. I am able to change the size by using the Ctrl+click option (the "Tiny" option is more in line with what it used to be before the update), but the change isn't permanent across sessions and I'd rather fix the root of the problem.

    Another thing is that the Ctrl+click dialogue font appears excessively small for whatever reason.

    Link to screenshot

    The DPI settings are the same as before the update, and just about everything else I've ran under X doesn't seem to have this problem. It's just XTerm that's having this issue.

    Here's the relevant bit of my .Xresources:

    XTerm*renderFont: True
    XTerm*borderWidth: 0
    XTerm*faceName: Bitstream Vera Sans Mono
    xterm*faceSize: 8
    xterm*vt100*geometry: 80x80
    xterm*saveLines: 16384
    *customization: -color
    xterm*termName: xterm-256color
    xterm*eightBitInput: false
    

    Edit: The contents of /etc/X11/app-defaults/XTerm on the problematic machine are exactly the same as the other machines, which aren't having this particular problem, but are still on 14.04. They also have the exact same copy of .Xresources on them.

    • Alexey
      Alexey almost 7 years
      I could change Xterm font following this tutorial. It was necessary to execute the command xrdb -merge .Xresources. This command is also mentioned in this answer. It looks like another option is to restart the X server. I imagine you have restarted X, so maybe you have a more complicated issue.
  • TmRa5O4ef
    TmRa5O4ef over 7 years
    I'm still unclear as to what I'm supposed to change here and I don't think I'm getting through with the question. This is not a new machine, the only thing new about this machine is the Xenial update. The 5x7 font option is already there on the menu, I just want the XTerm to spawn with smaller fonts by default.