Resizing an Xvfb display

女生的网名这么多〃 提交于 2019-12-03 05:08:29
edigu

You can use the server-args command line argument to specify a custom resolution for the virtual frame buffer being created, but this does not change the resolution of an existing virtual frame buffer:

xvfb-run --server-args="-screen 0, 1024x768x24" ...

Most distributions now ship a version of Xvfb with randr support. The code as committed in late 2015 vfb: add randr support (v2).

To resize you will first need to define a new mode (you can use tools like gtf to get the modeline definition values), add it to the virtual output, and then you can switch to it.

ie for 1280x1024:

xrandr --newmode "1280x1024"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode screen 1280x1024
xrandr -s 1280x1024
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!