Today I spent several hours wrestling with Xvfb on a fresh new Ubuntu 9.10 (Karmic Koala) installation. The initial stages of the install are very promising, simply running:
>> aptitude install xvfb
Seems to work its charm and successfully install the software package. Unfortunately, if you attempt to test the Xvfb using something like:
>> Xvfb :99 -ac
You will most likely see a long list of error messages, something like:
[dix] Could not init font path element /usr/share/fonts/X11/misc, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/Type1, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list! sh: /usr/bin/xkbcomp: not found (EE) Error compiling keymap (server-42) (EE) XKB: Couldn't compile keymap [config/dbus] couldn't take over org.x.config: org.freedesktop.DBus.Error.AccessDenied (Connection ":1.74" is not allowed to own the service "org.x.config.display99" due to security policies in the configuration file)
Let us tackle this mess of an automated installation…
>> sudo aptitude install x11-xkb-utils
This will install the xkbcomp required.
2. Missing Font Errors (unnecessary?)
The font issues, probably, do not require fixing from a functional standpoint; nonetheless, you can install them with the following command:
>> sudo aptitude install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
Apparently, some of the required components of this fake X server are within the core package of the actual X server. Try installing:
>> sudo aptitude install xserver-xorg-core
This last fix, is not going to work for everyone. I can use it because my intended use is on a remote server configuration not requiring any packages that depend on DBUS messaging system.
>> sudo aptitude remove dbus
These four steps enabled my 9.10 Ubuntu server to run Xvfb. I tested the xvfb-run command like:
>> xvfb-run firefox
It launches the firefox browser (if installed, if not installed it just exits) and waits for you to CTRL+C cancel it.