VNC server setup

On the remote host

Install vino

sudo apt update 
sudo apt install vino

Enable VNC

sudo ln -s ../vino-server.service   /usr/lib/systemd/user/graphical-session.target.wants
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false

Open the following file 

code /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml

and add

    <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>

Compile the above file

sudo glib-compile-schemas /usr/share/glib-2.0/schemas

Set the VNC login password

gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password $(echo -n '12345678'|base64)

Reboot

To start VNC automatically

gsettings set org.gnome.Vino enabled true
mkdir -p ~/.config/autostart
code ~/.config/autostart/vino-server.desktop

and add the following to the file

[Desktop Entry]
Type=Application
Name=Vino VNC server
Exec=/usr/lib/vino/vino-server
NoDisplay=true

The VNC server should be ready. To access from a client machine, install a VNC client application, such as gvncviewer on ubuntu and vnc viewer on android, and connect to the VNC server with IP address ( can be found by ifconfig ), and login with the password.

reference link

https://www.jianshu.com/p/e670a9a26989https://www.jianshu.com/p/e670a9a26989

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值