问题
How can I get the display number that used while running Xvfb? For example somebody run
./Xvfb :14
I need somehow to get the used display number 14.
Thanks in advance
回答1:
on a unix system, run
ps -ef|grep Xvfb
and it should list it there with the process
回答2:
There are two ways I can think of:
- Look for the lock files, which will typically take the form \tmp.X*-lock, where * is the display number;
- Look at the log files, typically \var\adm\xfvb.log, but might be anywhere. There should be a line which says which display xfvb started listening to.
来源:https://stackoverflow.com/questions/2138131/how-to-get-xvfb-display-number