Michael Spector
Michael Spector

Reputation: 37009

Problems with bundling Xvfb into application

Our application runs some commands in a headless mode using frame buffer display. We can't rely on fact that Xvfb is installed on every machine, but we suppose that X server is, so we bundle Xvfb binary into our application. The problem is that on some machines, when running bundled Xvfb we get the following fatal error:

could not open default font 'fixed'

Is there a way to bundle basic fonts as well, and point Xvfb binary to them, or is there a more elegant solution to this?

Thanks!

Upvotes: 2

Views: 2598

Answers (2)

alanc
alanc

Reputation: 4180

Modern versions of libXfont from X.Org have the basic "fixed" and "cursor" fonts builtin, but until the more recent versions (I believe Xorg 1.7 from 2009), you needed to specify "built-ins" in the font path explicitly for Xservers like Xvfb to find them.

Upvotes: 2

totaam
totaam

Reputation: 1311

There is a more elegant solution coming up in the future, it is called Xdummy and is the ability to use a real X11 server with the dummy driver to get a virtual screen backed by a real server (Xvfb is barely maintained nowadays). More details (and packages) here, it is based on Xdummy by Karl Runge but is much cleaner (no shared library tricks) This will be part of Xorg server 1.12 (due shortly)

Until then, you could wrap Xvfb in a little script which figures out where the fonts are on the system (there aren't that many places) and adds the -fp string default font path argument to the command line.

Upvotes: 2

Related Questions