2025年Ubuntu20.04 虚拟显示器配置(解决无显示器远程黑屏问题)

Ubuntu20.04 虚拟显示器配置(解决无显示器远程黑屏问题)一 配置方法 1 安装软件 通过终端安装虚拟显示器软件 Ubuntu20 4 可以用 sudo apt get install xserver xorg core hwe 18 04 sudo apt get install xserver xorg video dummy 2 添加配置文件 在 usr share X11 xorg conf d 中添加 xorg

一、配置方法
1)安装软件
通过终端安装虚拟显示器软件,Ubuntu20.4可以用:

$ sudo apt-get install xserver-xorg-core-hwe-18.04
$ sudo apt-get install xserver-xorg-video-dummy

2)添加配置文件
在 /usr/share/X11/xorg.conf.d/ 中添加 xorg.conf 文件。
编辑 /usr/share/X11/xorg.conf.d/xorg.conf文件,内容如下:

Section "Monitor"
Identifier "Monitor0"
HorizSync 28.0-80.0
VertRefresh 48.0-75.0
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
EndSection
Section "Device"
Identifier "Card0"
Driver "dummy"
VideoRam 256000
EndSection
Section "Screen"
DefaultDepth 24
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Depth 24
Modes "1920x1080_60.00"
EndSubSection
EndSection

注意:虽然配置上面写了 “1920×1080”,但是实际上最大支持 “1360×768”

3)重启
重启计算机后,默认使用虚拟显示器。
使用向日葵或teamviewer实现远程连接即可

注意:如果需要再用显示器,需要删除或者重命名“xorg.conf”文件

编程小号
上一篇 2025-04-13 19:33
下一篇 2025-08-11 09:51

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/126825.html