Running Xvfb during a package build -- good idea?

Richard W.M. Jones rjones at redhat.com
Wed Oct 1 19:57:00 UTC 2008


On Wed, Oct 01, 2008 at 10:38:35AM -0400, Adam Jackson wrote:
> Orthogonal to whether koji can or should let you do it, this came up in
> the context of another discussion today.  I think what we'll end up
> doing is something like:
> 
> Xvfb -displayfd 3 3>& /tmp/whatever
> 
> to give the server a way of both picking a free display number, and
> communicating it back to the launching process.  Does that sound like
> it'd work for you?

Yes, really useful..

It's also worth noting that Debian ship something called Xvfb-run:

  http://www.penguin-soft.com/penguin/man/1/xvfb-run.html

  DESCRIPTION

  xvfb-run is a wrapper for the Xvfb (1x) command which simplifies the
  task of running commands (typically an X client, or a script
  containing a list of clients to be run) within a virtual X server
  environment.

  xvfb-run sets up an X authority file (or uses an existing
  user-specified one), writes a cookie to it (see xauth (1x)) and then
  starts the Xvfb X server as a background process. The process ID of
  Xvfb is stored for later use. The specified command is then run using
  the X display corresponding to the Xvfb server just started and the X
  authority file created earlier.

  When the command exits, its status is saved, the Xvfb server is killed
  (using the process ID stored earlier), the X authority cookie removed,
  and the authority file deleted (if the user did not specify one to
  use). xvfb-run then exits with the exit status of command .

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/




More information about the devel mailing list