Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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

#!/bin/sh

USERHOST=$1

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

 
discard

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.