A virtual display for ubuntu server

こ雲淡風輕ζ 提交于 2019-12-06 04:36:41

Set up a virtual X server in the background with Xfvb, then set the DISPLAY variable accordingly:

Xvfb :1 -screen 0 1920x1080x24+32 -fbdir /var/tmp &
export DISPLAY=:1
java -jar autoclick.jar
java -jar autoclick.jar
java -jar autoclick.jar

(and again, and again, and again...)

Due to the DISPLAY variable, any application started in that terminal will use your virtual X server. I guess what xvfb-run does is set up a Xvfb, run the program, then immediately shuts down Xvfb again.

Depending on your exact needs are, it may be possible to launch xnest using xvfb-run, then export the display created as your DISPLAY variable.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!