8

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

codingbadger
  • 42,678
  • 13
  • 95
  • 110

2 Answers2

13

on a unix system, run

ps -ef|grep Xvfb

and it should list it there with the process

Tom Ly
  • 155
  • 2
  • 8
  • Thank Tom. Like this, I have a better overview over the processes. – Van Uitkon Jan 18 '15 at 19:56
  • does not show display information – cosbor11 Aug 02 '22 at 16:44
  • @cosbor11 It does. For the output `ubuntu 5573 5564 0 11:47 pts/4 00:00:00 Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp -auth /tmp/xvfb-run.h9dPu7/Xauthority`, the `:99` is the display number. – Nav Jan 24 '23 at 11:50
2

There are two ways I can think of:

  1. Look for the lock files, which will typically take the form \tmp.X*-lock, where * is the display number;
  2. 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.
Charles Stewart
  • 11,661
  • 4
  • 46
  • 85