How to get Xvfb display number

2019-04-07 14:56发布

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

标签: x11
2条回答
一纸荒年 Trace。
2楼-- · 2019-04-07 15:07

on a unix system, run

ps -ef|grep Xvfb

and it should list it there with the process

查看更多
够拽才男人
3楼-- · 2019-04-07 15:16

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.
查看更多
登录 后发表回答