404 lines
8.7 KiB
HTML
404 lines
8.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of xvfb-run</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>xvfb-run</H1>
|
|
Section: User Commands (1)<BR>Updated: 2004-11-12<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
xvfb-run - run specified X client or command in a virtual X server environment
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>xvfb-run</B>
|
|
|
|
[
|
|
<I>options</I>
|
|
|
|
]
|
|
<I>command</I>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>xvfb-run</B>
|
|
|
|
is a wrapper for the
|
|
<B><A HREF="/cgi-bin/man/man2html?1x+Xvfb">Xvfb</A></B>(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.
|
|
<P>
|
|
|
|
<B>xvfb-run</B>
|
|
|
|
sets up an X authority file (or uses an existing user-specified one),
|
|
writes a cookie to it (see
|
|
<B><A HREF="/cgi-bin/man/man2html?1x+xauth">xauth</A></B>(1x))
|
|
|
|
and then starts the
|
|
<B>Xvfb</B>
|
|
|
|
X server as a background process.
|
|
The process ID of
|
|
<B>Xvfb</B>
|
|
|
|
is stored for later use.
|
|
The specified
|
|
<I>command</I>
|
|
|
|
is then run using the X display corresponding to the
|
|
<B>Xvfb</B>
|
|
|
|
server
|
|
just started and the X authority file created earlier.
|
|
<P>
|
|
|
|
When the
|
|
<I>command</I>
|
|
|
|
exits, its status is saved, the
|
|
<B>Xvfb</B>
|
|
|
|
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).
|
|
<B>xvfb-run</B>
|
|
|
|
then exits with the exit status of
|
|
<I>command</I>,
|
|
|
|
except in error conditions (see
|
|
<FONT SIZE="-1"><B>EXIT STATUS</B>
|
|
|
|
</FONT>
|
|
below).
|
|
<P>
|
|
|
|
<B>xvfb-run</B>
|
|
|
|
requires the
|
|
<B>xauth</B>
|
|
|
|
command to function.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-a</B>,<B> --auto-servernum</B>
|
|
|
|
<DD>
|
|
Try to get a free server number, starting at 99, or the argument to
|
|
<B>--server-num</B>.
|
|
|
|
<DT id="2"><B>-e </B><I>file</I><B></B>,<B> --error-file=</B><I>file</I>
|
|
|
|
<DD>
|
|
Store output from
|
|
<B>xauth</B>
|
|
|
|
and
|
|
<B>Xvfb</B>
|
|
|
|
in
|
|
<I>file</I>.
|
|
|
|
The default is
|
|
<I>/dev/null</I>.
|
|
|
|
<DT id="3"><B>-f </B><I>file</I><B></B>,<B> --auth-file=</B><I>file</I>
|
|
|
|
<DD>
|
|
Store X authentication data in
|
|
<I>file</I>.
|
|
|
|
By default, a temporary directory called
|
|
<I>xvfb-run.</I>PID
|
|
|
|
(where PID is the process ID of
|
|
<B>xvfb-run</B>
|
|
|
|
itself) is created in the directory specified by the environment variable
|
|
<B>TMPDIR</B>
|
|
|
|
(or
|
|
<I>/tmp</I>
|
|
|
|
if that variable is null or unset), and the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tempfile">tempfile</A></B>(1)
|
|
|
|
command is used to create a file in that temporary directory called
|
|
<I>Xauthority</I>.
|
|
|
|
<DT id="4"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display a usage message and exit.
|
|
<DT id="5"><B>-n </B><I>servernumber</I><B></B>,<B> --server-num=</B><I>servernumber</I>
|
|
|
|
<DD>
|
|
Use
|
|
<I>servernumber</I>
|
|
|
|
as the server number (but see the
|
|
<B>-a</B>,<B> --auto-servernum</B>
|
|
|
|
option above).
|
|
The default is 99.
|
|
<DT id="6"><B>-l</B>,<B> --listen-tcp</B>
|
|
|
|
<DD>
|
|
Enable TCP port listening in the X server.
|
|
For security reasons (to avoid denial-of-service attacks or exploits),
|
|
TCP port listening is disabled by default.
|
|
<DT id="7"><B>-p </B><I>protocolname</I><B></B>,<B> --xauth-protocol=</B><I>protocolname</I>
|
|
|
|
<DD>
|
|
Use
|
|
<I>protocolname</I>
|
|
|
|
as the X authority protocol to use.
|
|
The default is '.', which
|
|
<B>xauth</B>
|
|
|
|
interprets as its own default protocol, which is MIT-MAGIC-COOKIE-1.
|
|
<DT id="8"><B>-s </B><I>arguments</I><B></B>,<B> --server-args=</B><I>arguments</I>
|
|
|
|
<DD>
|
|
Pass
|
|
<I>arguments</I>
|
|
|
|
to the
|
|
<B>Xvfb</B>
|
|
|
|
server.
|
|
Be careful to quote any whitespace characters that may occur within
|
|
<I>arguments</I>
|
|
|
|
to prevent them from regarded as separators for
|
|
<B>xvfb-run</B>'s
|
|
|
|
own arguments.
|
|
Also, note that specification of '-nolisten tcp' in
|
|
<I>arguments</I>
|
|
|
|
may override the function of
|
|
<B>xvfb-run</B>'s
|
|
|
|
own
|
|
<B>-l</B>,<B> --listen-tcp</B>
|
|
|
|
option, and that specification of the server number (e.g., ':1') may
|
|
be ignored because of the way the X server parses its argument list.
|
|
Use the
|
|
<B>xvfb-run</B>
|
|
|
|
option
|
|
<B>-n </B><I>servernumber</I><B></B>,<B> --server-num=</B><I>servernumber</I>
|
|
|
|
to achieve the latter function.
|
|
The default is '-screen 0 1280x1024x24'.
|
|
<DT id="9"><B>-w </B><I>delay</I><B></B>,<B> --wait=</B><I>delay</I>
|
|
|
|
<DD>
|
|
Ignored for compatibility with earlier versions.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="10"><B>COLUMNS</B>
|
|
|
|
<DD>
|
|
indicates the width of the terminal device in character cells.
|
|
This value is used for formatting diagnostic messages.
|
|
If not set, the terminal is queried using
|
|
<B><A HREF="/cgi-bin/man/man2html?1+stty">stty</A></B>(1)
|
|
|
|
to determine its width.
|
|
If that fails, a value of '80' is assumed.
|
|
<DT id="11"><B>TMPDIR</B>
|
|
|
|
<DD>
|
|
specifies the directory in which to place
|
|
<B>xvfb-run</B>'s
|
|
|
|
temporary directory for storage of the X authority file; only used if the
|
|
<B>-f</B>
|
|
|
|
or
|
|
<B>--auth-file</B>
|
|
|
|
options are not specified.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>OUTPUT FILES</H2>
|
|
|
|
<P>
|
|
|
|
Unless the
|
|
<B>-f</B>
|
|
|
|
or
|
|
<B>--auth-file</B>
|
|
|
|
options are specified, a temporary
|
|
directory and file within it are created (and deleted) to store the X
|
|
authority cookies used by the
|
|
<B>Xvfb</B>
|
|
|
|
server and client(s) run under it.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tempfile">tempfile</A></B>(1).
|
|
|
|
If -f or --auth-file are used, then the specified X authority file is
|
|
only written to, not created or deleted (though
|
|
<B>xauth</B>
|
|
|
|
creates an authority file itself if told to use use that does not already
|
|
exist).
|
|
<P>
|
|
|
|
An error file with a user-specified name is also created if the
|
|
<B>-e</B>
|
|
|
|
or
|
|
<B>--error-file</B>
|
|
|
|
options are specified; see above.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
<B>xvfb-run</B>
|
|
|
|
uses its exit status as well as output to standard error to communicate
|
|
diagnostics.
|
|
<DL COMPACT>
|
|
<DT id="12">0<DD>
|
|
<B>xvfb-run</B>
|
|
|
|
only uses this exit status if the
|
|
<B>-h</B>,<B> --help</B>
|
|
|
|
option is given.
|
|
In all other situations, this may be interpreted as success of the specified
|
|
command.
|
|
<DT id="13">1<DD>
|
|
<B>Xvfb</B>
|
|
|
|
did not start correctly.
|
|
<DT id="14">2<DD>
|
|
No command to run was specified.
|
|
<DT id="15">3<DD>
|
|
The
|
|
<B>xauth</B>
|
|
|
|
command is not available.
|
|
<DT id="16">4<DD>
|
|
The temporary directory that was going to be used already exists; since
|
|
<B>xvfb-run</B>
|
|
|
|
produces a uniquely named directory, this may indicate an attempt by another
|
|
process on the system to exploit a temporary file race condition.
|
|
<DT id="17">5<DD>
|
|
A problem was encountered while cleaning up the temporary directory.
|
|
<DT id="18">6<DD>
|
|
A problem was encountered while using
|
|
<B><A HREF="/cgi-bin/man/man2html?1+getopt">getopt</A></B>(1)
|
|
|
|
to parse the command-line arguments.
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="19"><B>xvfb-run --auto-servernum --server-num=1 xlogo</B>
|
|
|
|
<DD>
|
|
runs the
|
|
<B><A HREF="/cgi-bin/man/man2html?1x+xlogo">xlogo</A></B>(1x)
|
|
|
|
demonstration client inside the
|
|
<B>Xvfb</B>
|
|
|
|
X server on the first available server number greater than or equal to 1.
|
|
<DT id="20"><B>xvfb-run --server-args=-screen 0 1024x768x24 ico -faces</B>
|
|
|
|
<DD>
|
|
runs the
|
|
<B><A HREF="/cgi-bin/man/man2html?1x+ico">ico</A></B>(1x)
|
|
|
|
demonstration client (and passes it the
|
|
<B>-faces</B>
|
|
|
|
argument) inside the
|
|
<B>Xvfb</B>
|
|
|
|
X server, configured with a root window of 1024 by 768 pixels and a color
|
|
depth of 24 bits.
|
|
</DL>
|
|
<P>
|
|
|
|
Note that the demo X clients used in the above examples will not exit on
|
|
their own, so they will have to be killed before
|
|
<B>xvfb-run</B>
|
|
|
|
will exit.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
See
|
|
|
|
the Debian Bug Tracking System <URL: <A HREF="https://bugs.debian.org/xvfb">https://bugs.debian.org/xvfb</A> >.
|
|
|
|
If you wish to report a bug in
|
|
<B>xvfb-run</B>,
|
|
|
|
please use the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+reportbug">reportbug</A></B>(1)
|
|
|
|
command.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<B>xvfb-run</B>
|
|
|
|
was written by Branden Robinson and Jeff Licquia with sponsorship from
|
|
Progeny Linux Systems.
|
|
<A NAME="lbAL"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1x+Xvfb">Xvfb</A></B>(1x),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1x+xauth">xauth</A></B>(1x)
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="21"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="22"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="23"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="24"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="25"><A HREF="#lbAF">ENVIRONMENT</A><DD>
|
|
<DT id="26"><A HREF="#lbAG">OUTPUT FILES</A><DD>
|
|
<DT id="27"><A HREF="#lbAH">EXIT STATUS</A><DD>
|
|
<DT id="28"><A HREF="#lbAI">EXAMPLES</A><DD>
|
|
<DT id="29"><A HREF="#lbAJ">BUGS</A><DD>
|
|
<DT id="30"><A HREF="#lbAK">AUTHOR</A><DD>
|
|
<DT id="31"><A HREF="#lbAL">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:31 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|