Here is a short step by step guide for installing x11vnc server on Ubuntu 16.04 Xenial Xerus. I prefer this to Vino that comes pre-installed because Vino doesn’t play well with Windows. If you are back and forth between Linux and Windows x11vnc server works really well.
Disclaimer:
I’m a Linux n00b. I’m enjoying playing with Linux but my background is in Windows. I’m putting this up for my own benefit so I can find it later and hopefully it may benefit someone else. If there are any corrections or suggestions to make this instruction more complete, please send me some feedback in the comments section. I’ve included the links to the places from where I’ve gathered this information.
Links:
https://help.ubuntu.com/community/VNC/Servers
http://manpages.ubuntu.com/manpages/trusty/man1/x11vnc.1.html
First, install x11vnc.
1 |
sudo apt-get install x11vnc |
Then create a password for the user to login with.
1 |
x11vnc -storepasswd |
To run from the terminal you would run the following:
1 |
x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -shared |
All of the options are listed on the man page: - http://manpages.ubuntu.com/manpages/trusty/man1/x11vnc.1.html
I’d like it to start automatically though. To do this in Ubuntu 16.04 you would do the following:
1 |
sudo nano /lib/systemd/system/x11vnc.service |
Then copy and paste the following, making sure to change the USERNAME in file path for the rfbauth parameter.
1 2 3 4 5 6 7 8 9 10 |
[Unit] Description=Start x11vnc at startup. After=multi-user.target [Service] Type=simple ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -shared [Install] WantedBy=multi-user.target |
Then start the service.
1 2 3 4 5 |
sudo systemctl daemon-reload sudo systemctl enable x11vnc.service sudo systemctl start x11vnc.service |
Now you should be able to login via VNC from you’re favourite VNC client. On that note, I’ve found that mobaXterm is a great VNC/SSH remoting tool for joining from Windows clients to Linux clients.
Hope this helps!