I need to give a command like
Xvfb :6 -screen 0 1024x768x24
Where 6 can be a display number. Now Xvfb can already be using that Display, so how do I get the first display number not in use?
There may be an easier way, but I'd write a script that queries the displays with xdpyinfo.
There are pretty much 3 cases:
A script would look a bit like this:
xvfb-run has a flag
Squished into a single line that you could alias in your .bashrc, it looks like this:
If you are simply trying to run a program with the display set to Xvfb, I would just use xvfb-run.