无显示器的情况下用vnc等远程工具连进去会遇到桌面卡顿,组件显示不全,分辨率不对等种种问题,解决方法为:
-
安装
xserver-xorg-video-dummy
-
添加文件
/etc/X11/xorg.conf.d/99-dummy.conf
内容如下:
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
VideoRam 256000
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 10.0-300
VertRefresh 10.0-200
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080"
EndSubSection
EndSection
以上
Modes "1920x1080"
部分是默认的分辨率,可以自行修改
- 重启机器
此外,重启后GUI登录界面无人登录的情况下,用普通用户打开x11vnc会启动失败,此时使用:
sudo x11vnc -auth /var/run/lightdm/root/:0
即可看到登录界面. 其它VNC及其它dm可类比修改使用.
一切顺利的情况下重启后即可进入正常的远程界面了
注意: 此种修改方式可能会导致接上物理显示器后显示器无输出的情况,此时需要删除/etc/X11/xorg.conf.d/99-dummy.conf
,然后重启。