[kwlug-disc] VNC to Ubuntu

CrankyOldBugger crankyoldbugger at gmail.com
Tue Jun 7 13:49:13 EDT 2016


Ever struggle with a problem so long that when you find the cure you invent
a new (not nice) word?  I won't share the new word with you but here's what
happened...

I have a laptop that's had several different version of Ubuntu (both Unity
and Gnome) installed over the years.  For the life of me I could never
connect to it remotely using VNC.  SSH worked fine, and TeamViewer also
worked fine.  And yes, I had the port forwarding on the router set up right.

Other Ubuntu machines in the house could receive VNC connections just fine.

My VNC host of choice was always Vino, which comes pre-installed for many
versions now.

So I was playing with it today to see what I could do, and I figured out
that I could VNC to the laptop from other Linux machines (i.e. the ones
that could receive VNC just fine, mentioned above).  I could not connect
from my work machine.  So I thought it might be a port forwarding error but
the PF's were fine.  Then I realized that I could not VNC from a local
(i.e. same subnet) Windows machine.  So that prompted me to lighten the
requirements on encryption.  Still no dice.  I can VNC from a local Linux
machine to the laptop, but no Windows connectables.

So in an act of mad desperation, I wiped out VNC/Vino and installed
x11VNC.  And connected on the first try.  <Insert new word here>.

Here's how I installed x11VNC (whilst connected remotely via TeamViewer, if
you're curious)...

(the site that I got this from presented it as a script, I just
old-schooled it)

Step 1 - Install X11VNC
sudo apt-get install x11vnc -y
Step 2 - Specify Password to be used for VNC Connection
sudo x11vnc -storepasswd /etc/x11vnc.pass
Step 3 - Create the Service Unit File
nano /lib/systemd/system/x11vnc.service
[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 Service
sudo systemctl enable x11vnc.service
sudo systemctl daemon-reload

Step 4b - wait a few seconds

Step 5 - Restart System
sudo shutdown -r now

Once the laptop booted back up, I was able to VNC to the login screen
(which was a big advantage of TeamViewer over Vino.  if you reboot, you
can't Vino your way back in).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20160607/8a958715/attachment.htm>


More information about the kwlug-disc mailing list