Connecting to Gnome 3 Desktop

Posted January 12, 2017 6.5k views
DigitalOceanVPNUbuntu 16.04

I have a Ubuntu 16.10 x64 Droplet with ubuntu desktop which I am connecting to via x2go and that works, however, I also installed gnome 3 but cannot connect to that with either x2go or RealVNC.

I tried setting up VNC with this tutorial :

But cannot get past Step 4 without it timing out while connecting that tunnel.

If i can log into Gnome with x2go as well that would be better.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


When setting up the Droplet, did you create a new user and add that user to the sudo group and then set that username in /etc/init.d/vncserver? If not, you’ll need to do that and then pass the username to the SSH command. You don’t want to pass root as the user.

adduser demo \
&& gpasswd -a demo sudo

Where demo is the user you’d like to login as. Now run:

ssh -L 5901: -N -f -l demo DROPLET_PUBLIC_IP

If you’re on a 512MB droplet, you may want to run with a 1GB droplet as Gnome does tend to use more resources than XFCE and other, more lightweight desktops.

I just created a fresh Ubuntu 14.04 Droplet and ran through the entire tutorial, removed XFCE and then installed Gnome and after restarting then running vncserver, was able to log right in and access the Gnome desktop.

sudo apt-get purge xfce4 -y \
&& sudo apt-get install gnome -y \
&& shutdown -r now

Then log back in to SSH:

  • I did add the user and to sudo. when i run the

    ssh -L 5901: -N -f -l demo DROPLET_PUBLIC_IP

    i get a message saying “failed to add the host to the list of known hosts”
    and, bind: address already in use
    channelsetupfwdlistenertcpip: cannot listen to port: 5901
    could not request a local forwarding

    when looking what is being listened i get

    ssh     15237 nick    4u  IPv6  43798      0t0  TCP ip6-localhost:5901 (LISTEN)
    ssh     15237 nick    5u  IPv4  43799      0t0  TCP localhost:5901 (LISTEN)


Are you running the SSH command locally, or on the server that’s serving as your VNC Server? For example, the command:

ssh -L 5901: -N -f -l demo DROPLET_PUBLIC_IP

is meant to be ran from your Mac (via Terminal) or Windows machine (using PuTTy or similar), not on your Droplet.