更改无头 ubuntu 上的默认屏幕分辨率



我在无头的ubuntu服务器上运行一个jenkins实例。对于某些 GUI 测试,我收到以下错误

org.assertj.swing.exception.ActionFailedException: The component to click is out of the boundaries of the screen

如何设置屏幕分辨率?

如果您使用的是 xvfb,这可能是您正在寻找的:

xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" ant test

这将调整虚拟屏幕大小。将"ant test"替换为您自己的命令。

最新更新