Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a dyndns account linked to my home computer and everything is set up so that I can SSH to it from my work (university) computer. I then connect it to the university VPN (using these steps) and proceed to attempt to use the Remote Desktop Viewer to access it graphically. However, this fails, I'm not sure why. I tried using the dyndns URL, and the local addresses returned by running ifconfig on the home laptop:

eth0      Link encap:Ethernet  HWaddr 00:90:f5:be:62:10  
          inet addr:  Bcast:  Mask:
ppp0      Link encap:Point-to-Point Protocol  
          inet addr:  P-t-P:  Mask:

but none of those worked, even after specifying the port 5900 (which I believe should be automatically selected). I am not sure which one I should be using (inet addr, P-t-P?)

The error I get is Connection to host <hostname> was closed, although sometimes it seems like a timeout, while others it fails immediately.

Here's the output of ifconfig in my work computer:

eth0      Link encap:Ethernet  HWaddr bc:ae:c5:2d:3a:ef  
          inet addr:  Bcast:  Mask:
lo        Link encap:Local Loopback  
          inet addr:  Mask:
share|improve this question
up vote 1 down vote accepted

The way to go here probably is tunneling your VNC through the SSH session or using a reverse VNC protocol.

The default Ubuntu remote desktop viewer Remmina can be set up to do this.

Provided the VNC server can tunnel the VNC protocol through SSH you can use any VNC viewer capable of receiving this signals.

We do that here using x11vnc Install x11vnc as the VNC server and vncviewer (of xtightvncviewer Install xtightvncviewer).

If you already had set up VNC on your home computer it is as easy as running

x11vnc -display :0

on your home machine to export display :0 through VNC. This can also be done through an SSH session. Note that for the next step you need to run an SSH server on your home machine.

In your office run the vncviewer with option -via for tunneling through SSH:

vncviewer -via localhost:0

For a throughout guide see: x11vnc home page.

See the following question on how to connect to your remote machine using lightDM:

share|improve this answer
Thanks, it works :) I'm still a little bugged because vinagre used to work and now it doesn't anymore, and I'd like to know why, but at least now I have something that does :) – waldyrious Jan 22 '13 at 18:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.