I decided to build XScreensaver from source recently after realizing my distribution had a slightly outdated build in the repo. Everything is great except for the dialog boxes, which have a humungous, awful, Papyrus like font.

I'm told that I can edit a file titled ".Xdefaults", but that file doesn't exist. Nor does .Xresources, which supposedly does the same thing. Apparently if I don't have one that I need to create it myself. But if one doesn't exist, then where is the program getting this font from? I feel like creating an .Xdefaults file wouldn't solve the problem here. I tried editing the source code to change the font but it seems like the program just ignores any changes I make to the font names and keeps the font.

Awful font

I'm using Elementary OS. I'm told xscreensaver doesn't work well with eOS, but since the version I downloaded from the package manager has a different font, I beg to differ.


X resources come from several places; the first place is the database inside the X server and managed with, e.g., xrdb. Typically ~/.Xresources (if it exists) will be loaded into the X server by your distro's X login scripts — using xrdb. ~/.Xdefaults servers a similar purpose.

The fallback (before compiled-in defaults) is the app defaults files. I'm not entirely sure where they're located on Elementary OS, but on Debian they're in /etc/X11/app-defaults — in particular, take a look at /etc/X11/app-defaults/XScreenSaver. Another possible location is /usr/lib/X11/app-defaults/XScreenSaver.

BTW: XScreenSaver probably uses traditional X font naming, not modern Fontconfig naming. Which also may mean not all fonts are available. xfontsel can be used to get the traditional X font name (and find a font you like).

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.