Ubuntu16.04安装VNC-Server

Ubuntu16.04安装VNC-Server

Posted by Jae on November 20, 2018

1 安装X11VNC

sudo apt-get install x11vnc -y

2 配置登陆密码

sudo vu /lib/systemd/system/x11vnc.service
添加一下内容
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target

3 设置开机自启

sudo systemctl enable x11vnc.service
sudo systemctl daemon-reload

4 配置防火墙

关闭防火墙或者开放5900端口

sudo ufw allow 5900

jae@jae-ubuntu:~$ sudo ufw allow 5900
[sudo] password for jae:
Rules updated
Rules updated (v6)

5 Reboot

sudo reboot

6 VNC客户端连接

客户端配置

连接