Ubuntu 20.04 虚拟显示器且远程连接

一、配置方法

1)安装软件

通过终端安装虚拟显示器软件。

$ 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 文件。

$ 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)重启

重启计算机后,默认使用虚拟显示器。

使用向日葵或teamviewer实现远程连接即可

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

猜你喜欢

转载自blog.csdn.net/qq_43030934/article/details/113394502