RealVNC Not Connecting

January 11, 2017 243 views
Configuration Management Firewall VPN Ubuntu 16.04

I have been having some problems connecting to my Droplet with RealVNC, I used the guide below to set it up. My Droplet is a (2GB) Ubuntu 16.0.4.1 x64. I have added an exception in my Windows 10 Firewall as well and the TP-Link Ports were forwarded as well.

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-14-04

Below are the errors I'm getting if I try either of these ways

46.101.13.241:5901 -> Timed out waiting for a response from the computer
localhost:5901 -> The connection was refused by the computer

Xtightvnc 1860 root 3u IPv4 18916 0t0 TCP *:5901 (LISTEN)

1 Answer
ryanpq MOD January 11, 2017
Accepted Answer

You can try restarting the VNC service with the command:

sudo service vncserver restart

As the messages you are seeing do indicate that it may not be running.

An alternative that might make things easier would be to set up xfce and x2go instead of VNC. x2go runs over SSH by default making it secure and easier to configure. To create a droplet with an xfce desktop and x2go you can

1.) Go the the droplet creation page and select Ubuntu 14.04 or Ubuntu 16.04
2.) Choose a size for your droplet (This may work on 512MB but I would strongly recommend at least a 1GB)
3.) Select a region for your droplet
4.) Check the "user-data" box. A text field will be displayed. Paste the following into that text field:

#!/bin/sh
export DEBIAN_FRONTEND=noninteractive;
apt-get update;
apt-get -y install software-properties-common xubuntu-desktop;
add-apt-repository -y ppa:x2go/stable;
apt-get update;
apt-get -y install x2goserver x2goserver-xsession;

5.) Give your droplet a name and select any other options you want and then click Create.

When your droplet has finished creating it will kick off running the script we pasted into the create page. This may take up to 10-12 minutes to complete it's process of downloading and installing additional software. After that time, you can connect to your desktop with the free x2go client for Windows, Mac or Linux.

Have another answer? Share your knowledge.