How to find an available display for Xvfb?

Irek Szczesniak ijs at txcorp.com
Wed Apr 27 09:03:02 PDT 2005


Hi,

I want to run Xvfb, and because there may be other Xvfb running, I
cannot always use the same DISPLAY, such as ":100".  A solution is to
run Xvfb with DISPLAY=:m, and rerun Xvfb with DISPLAY=:n, n = m + 1,
in case we find "Server is already active for" in its stderr.

However, I am wondering if there is an option to Xvfb which would make
Xvfb look for an available display, run Xvfb on this display and print 
the chosen display name to stderr.


Thanks & best,
Irek



More information about the xorg mailing list