Find a free X11 display number

前端 未结 5 1835
旧巷少年郎
旧巷少年郎 2021-02-19 23:51

I have some unit tests that need an X11 display so I plan to start Xvfb before running them, but to start Xvfb I will need a free display number to connect it to. My best guess

5条回答
  •  眼角桃花
    2021-02-20 00:29

    Possibly a bit off-topic, but if you use xvfb-run to start your Xserver-needing command, then just running

    # xvfb-run -a your command
    

    does the trick.

提交回复
热议问题