Ubuntu 16.04 LTS installed VNC, in Baidu and Google to find a lot of tutorials, not too old, that is to say farfetched, so can not help writing some record straight.
Ubuntu 16.04 Lts is the latest LTS version of the system, it is estimated that the future will also have a long-term use of frequency, configuration of Remote Desktop, will greatly facilitate work and life. Many people will also use SSH remote management, because SSH installation and use is very simple thing, do not repeat.
VNC has a lot of choices, vnc4server,tigervncserver and so on, are not recommended, difficult to install and difficult to use. After many experiments and tests, only X11VNC was used as the VNC server.
The specific configuration steps are as follows:
# step 1-Install X11vnc
# #################################################################
sudo apt Install x11vnc-y
# step 2-Configure access password
# #################################################################
sudo x11vnc-storepasswd/etc/x11vnc.pass
# Step 3-Create service
# ########################## #######################################
VI /lib/systemd/system/x11vnc.service
#粘贴如下代码, Last: Wq save, use the root user, or you do not have permissions.
[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
# Step 4-Configure the firewall, configure and start the service
# ################################################################
sudo ufw allow 5900
sudo systemctl enable X11vnc.service
sudo systemctl daemon-reload
Last reboot.
It is estimated that many people see this will head big, but also have to enter the code AH ....
Well, I'll write a script, please take it, the script will be restarted automatically after running.
Su Root
wget https://github.com/longhr/ubuntu1604hub/raw/master/ubuntu1604VNC.sh
chmod u+x ubuntu1604vnc.sh
./ubuntu1604vnc.sh
can be completed.
Attention:
/lib/systemd/system/x11vnc.service must use root permissions to write
If the root password is not known, you can reset the root password
sudo passwd root
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Ubuntu 16.04 LTS One-touch installation VNC