Ubuntu 20.04 virtual display and remote connection

1. Configuration method

1) Install the software

Install the virtual display software through the terminal.

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

2) Add configuration file

Add the xorg.conf file in /usr/share/X11/xorg.conf.d/.

$ sudo vim /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
~
~
~
:wq
$
注意:虽然配置上面写了 “1920x1080”,但是实际上最大支持 "1360x768"

3) Restart

After restarting the computer, the virtual display is used by default.

Use sunflower or teamviewer to realize remote connection

参考原文:1.https://blog.csdn.net/h_bpdwn/article/details/103727551
2.https://blog.csdn.net/weixin_44523062/article/details/105405019

Guess you like

Origin blog.csdn.net/qq_43030934/article/details/113394502