Ubuntu 16.04 LTS One-touch installation VNC

Source: Internet
Author: User
Tags x11vnc

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.