Ubuntu 16.10 安装配置远程桌面(VNC),ubuntu16.10
Ubuntu 16.10 安装配置远程桌面(VNC),ubuntu16.10
--------------------------------
#步骤 1 :安装x11vnc
--------------------------------
root@local:~# apt-get install x11vnc -y
--------------------------------
#步骤 2 :配置访问密码
--------------------------------
root@local:~# x11vnc -storepasswd /etc/x11vnc.pass
--------------------------------
#步骤 3 :创建服务
--------------------------------
root@local:~# vim /lib/systemd/system/x11vnc.service
#注意必须用root用户才可以编辑。
#黏贴如下代码。
[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
--------------------------------
#步骤 4 :配置防火墙
--------------------------------
#注意以下端口号必须与步骤 3 中的端口号一致。
root@local:~# ufw allow 5900
--------------------------------
#步骤 5 :配置和启动服务
--------------------------------
#以下命令为配置服务为开机启动。
root@local:~# systemctl enable x11vnc.service
#以下命令为重新载入服务配置。
root@local:~# systemctl daemon-reload
--------------------------------
#步骤 6 :重启系统。
--------------------------------
#The End
评论暂时关闭