Resolving `xterm: cannot load font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1`

Frequently I see in journalctl output:

<date> <vm> qubes.StartApp+qubes-run-terminal-dom0[..]: xterm: cannot load font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1"

It’s harmless, just log noise. Comes of using xterm on reduced/minimal templates. Here’s the simplest way to make it go away (Debian):

root@template:~# apt install xfonts-base
root@template:~# fc-cache  # (might not be required)
2 Likes

Frequently I see in journalctl output:

I don’t (and xfonts-based is not installed).
How come?

I think there is no ready answer to that question, xterm font resolution is nontrivial as it’s laden with legacy and there are several places/ways fonts can be set. The default font face is fixed which is (always?) an alias for the big long font name/definition in the subject of this thread.

Best guess, and assuming you do use xterm (not some other terminal): you have a properly defined faceName X resource in your ~/.Xresources or some other place that overrides the default of fixed and references a font that is actually installed. In my work qubes that’s what I do, but in my system/utility qubes I don’t usually bother.

Top tip!
It’s a long time since I meddled with X fonts, but I do like a quiet log file.

Minor typo

Hazy memory: should that be “fc-cache”…?

1 Like

Eek. Fixed, thanks :saluting_face:

1 Like

@Euwiiwueir

assuming you do use xterm

I do.

you have a properly defined faceName X resource in your ~/.Xresources or some other place that overrides the default of fixed and references a font that is actually installed.

In /etc/X11/Xresources/x11-common I have *faceName: Monospace bold.

$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

$ find /usr/share/fonts 
/usr/share/fonts
/usr/share/fonts/truetype
/usr/share/fonts/truetype/dejavu
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf

On Debian, it worked for me placing the configuration in the /etc/X11/app-defaults/XTerm file:

[...]
xterm*faceName: Hack Nerd Font Mono
[...]
1 Like