Ubuntu20无显示器向日葵图形界面远程设置

1、安装组件

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

2、 编辑配置文件

sudo vim /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

3、sudo reboot   后即可正常使用向日葵远程图形界面

4、如果需要使用显示器直连显卡,需要删除/usr/share/X11/xorg.conf.d/xorg.conf,然后重启机器即可。

你可能感兴趣的:(linux,运维,服务器)