Virtual Framebuffer X Server (Xvfb)



Xvfb - virtual framebuffer X server for X11,  provides a X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory. The primary use of this server was intended to be server testing; other uses include testing clients, doing batch processing with Xvfb as a background rendering engine.  We have found that Xvfb provides an excellent solution for us to run a X based application on production server machines that don't have X server on them. The application can be started at booting time as a background process and without a visible display either locally or remotely. The EPICS Alarm handle (a standalone program)  used here for PEPII and NLCTA production is a good example for such usage.  Talk to Judy Rock (jrock@slac) and Steph Allison (saa@slac) at SLAC for details.

Installation Guide:

Download the compressed tar file of the X11R6 binaries for Solaris via ftp Xvfb is part of the distribution.

The binaries will have to be extracted in /usr/X11R6. The reason for this is that Xvfb (and other utilities included) have been compiled to look in /usr/X11R6 for needed resources. The following directories will be created:

                bin  include  lib  man

Xvfb has been installed on PEPII gateway servers (opi00, opi01, opi02) and NLCTA server (opi04). See table below.

Starting up Xvfb:

To start up Xvfb, type: 

 $ /usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 & 

Any graphics output going to display 1 will be sent to the shared memory. 

In order to have Xvfb start up automatically at booting time, the startup line above needs to be inserted into file /etc/init.d/rc.local on opi00, opi01 and opi02; otherwise to /etc/rc.local.private on opi04. Any errors reported will be sent to file /tmp/Xvfb.log. See table below.

Server machine Running Xvfb  Startup file Log file
opi00 not yet /etc/init.d/rc.local /tmp/Xvfb.log
opi01 not yet /etc/init.d/rc.local /tmp/Xvfb.log
opi02 yes /etc/init.d/rc.local /tmp/Xvfb.log
opi04 yes /etc/rc.local.private /usr/var/adm/Xvfb.log
opi05 not yet /etc/rc.local.private /usr/var/adm/Xvfb.log

Running applications:

Xvfb is now ready to be used by applications.  Set the current display to use the virtual framebuffer for graphics display, type:

 $ setenv DISPLAY :1.0 

Execute application from command line:

$ application &

To start it up automatically at booting time,   add "setenv DISPLAY :1.0"  to the startup script for application. See Alarm Handler for example. 

For more information about Xvfb, see the man page:

$ man -M /usr/X11R6/man Xvfb

Note that Xvfb can also peacefully co-exist with other X Server that may be running on the same machine.

Contact: Jingchen Zhou (X4661, jingchen@slac). Last edited on 03/27/02 .