本人PC上安装的Ubuntu为18.04.3,具体桌面共享配置步骤如下。
Step1: 安装dconf-editor
sudo apt install dconf-editor
Step2: dconf-editor配置
dconf write /org/gnome/desktop/remote-access/require-encryption false
Step3: 重启屏幕共享:
settings-> Sharing->Screen Sharing,设置:
Step4: 使用vnc远程连接
当然,还有些Ubuntu 18.04版本采用上述方法设置还是无法实现桌面共享。这里以Nvidia Jetson系列嵌入式开发板上安装的Ubuntu18.04桌面系统为例,介绍这类桌面系统配置桌面共享的方法。
Step1: 安装dconf-editor
sudo apt-get install vino dconf-editor
Step2: 配置dconf-editor
dconf write /org/gnome/desktop/remote-access/prompt-enabled false
dconf write /org/gnome/desktop/remote-access/require-encryption false
Step3: 配置 org.gnome.Vino.gschema.xml
sudo vi /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml
在第二行后,增加如下内容
<key name='enabled' type='b'>
<summary>Enable remote access to the desktop</summary>
<description>
If true, allows remote access to the desktop via the RFB
protocol. Users on remote machines may then connect to the
desktop using a VNC viewer.
</description>
<default>false</default>
</key>
Step4: 重新编译
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
Step5: 启动服务
方法1:在Ubuntu桌面系统中开启服务
/usr/lib/vino/vino-server
方法2:ssh下进入系统开启远程控制
/usr/lib/vino/vino-server --display=:0
Step6: 使用vnc远程连接