From the command used to run actual Xvfb
ps -eo args|grep Xvfb
which outputs sth like
Xvfb :99 -ac -fbdir /tmp/ -nolisten tcp
Xvfb :100 -screen 0 640x480x24 -nolisten tcp
grep Xvfb
From the auth file
xvfb-run uses an X authority file you can read the info from. Assuming it lives in /tmp, get the display number withxauth list on the file:
xauth -f $(ls -rt1 /tmp|grep xvfb-run|tail -1)/Xauthority* list
which outputs something like
hostname/unix:99 MIT-MAGIC-COOKIE-1 4514215c67d5b0b8d389792ca7c4b9cc
where :99 is the display number. The file structure with random filenames looks like
/tmp
└── xvfb-run.I9aLaw
└── Xauthority.CPACw7
The behaviour is described in the man page:
Unless the -f or --auth-file options are specified, a temporary directory and file within it are created (and deleted) to
store the X authority cookies used by the Xvfb server and client(s) run under it.