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'm not going to be in front of my ubuntu machine for a while but I very much need to be able to remote desktop to it.

In an ssh session, what's the best route to take to set-up and allow certain users to remote desktop to my machine?

share|improve this question
up vote 1 down vote accepted

One option is to use a little script that tunnels the remote desktop session (using x11vnc) over the ssh,

file: vncoverssh



ssh -f -L 5900:localhost:5900 $USERHOST \
  x11vnc -scale 0.5 -safer -localhost -nopw -once -display :0 \
  && sleep 5 \
  && vncviewer -encodings "tight" localhost:0

This can then be called using

vncoverssh USER@HOST

This script can be modified to store the user and host name if desired.

share|improve this answer

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.