安装软件:

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

/usr/share/X11/xorg.conf.d/目录添加配置文件10-dummy-xorg.conf,加入以下配置:

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
    VideoRam 256000
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    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 "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "1920x1080_60.00"
    EndSubSection
EndSection

保存之后重启服务器即可无显示器通过远程连接到ubuntu。

相关参考:
https://techoverflow.net/2019/02/23/how-to-run-x-server-using-xserver-xorg-video-dummy-driver-on-ubuntu/

需要注意的是使用这种方法之后即使连接显示器也不会再显示内容。

配置文件下载 10-xorg.conf

标签: ubuntu

添加新评论