ubuntu虚拟显示器

  • 安装视频虚拟化插件
sudo apt-get install xserver-xorg-video-dummy
  • 创建默认的 X Windows 配置文件,如果已存在,请先备份
sudo vi /usr/share/X11/xorg.conf.d/xorg.conf
  • 将以下内容添加到文件中,设置分辨率
Section "Device"
 Identifier "Configured Video Device"
 Driver "dummy"
EndSection

Section "Monitor"
 Identifier "Configured Monitor"
 HorizSync 31.5-48.5
 VertRefresh 50-70
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 DefaultDepth 24
 SubSection "Display"
 Depth 24
 Modes "1920x1080"
 EndSubSection
EndSection
  • 保存配置,重启

留下评论

您的邮箱地址不会被公开。 必填项已用 * 标注