按照以下步骤进行:
一、安装工具
$ sudo apt-get install vino dconf-editor
& dconf write /org/gnome/desktop/remote-access/prompt-enabled false
& dconf write /org/gnome/desktop/remote-access/require-encryption false
二、修改文件
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>
三、编译
$ sudo glib-compile-schemas /usr/share/glib-2.0/schemas
四、开启服务
#启动服务端命令为:
$ /usr/lib/vino/vino-server
#如果设置使用密码登录,需要运行:
$ gsettings set org.gnome.Vino require-encryption false
#允许所有网络连接:
$ gsettings reset org.gnome.Vino network-interface