Ubuntu 16.04 LTS 一键安装VNC
- 具体配置步骤如下
- 一键安装的方式
- vnc工具推荐使用VNC Viewer
VNC有很多选择,VNC4server,tigervncserver等等。经过多次实验和测试,最后只采用 x11vnc 作为VNC服务器端。
具体配置步骤如下
- 步骤 1 - 安装 X11VNC
sudo apt install x11vnc -y
- 1
- 步骤 2 - 配置访问密码
sudo x11vnc -storepasswd /etc/
- 1
- 步骤 3 - 创建服务
vi /lib/systemd/system/
- 1
#粘贴如下代码,最后 :wq 保存,请使用root用户,否则没有权限。
[Unit]
Description=Start x11vnc at startup.
After=
[Service]
Type=simple
#ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/ -rfbport 5900 -shared
ExecStart=/usr/bin/x11vnc -display :1 -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/ -rfbport 5900 -shared
[Install]
WantedBy=
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 步骤 4 - 配置防火墙,配置和启动服务
sudo ufw allow 5900
sudo systemctl enable
sudo systemctl daemon-reload
sudo systemctl restart x11vnc
- 1
- 2
- 3
- 4
一键安装的方式
su root
wget /longhr/ubuntu1604hub/raw/master/
chmod u+x
./
- 1
- 2
- 3
- 4
即可完成。
vnc工具推荐使用VNC Viewer
/en/auth