[Techtalk] Viewing desktops on a remote LAN

Chris Wilson chris+linuxchix at aptivate.org
Sat Jan 9 16:30:05 UTC 2010

Hi David,

> On Jan 9, 2010, at 6:27 AM, David Sumbler <david at aeolia.co.uk> wrote:
> > She now has two computers connected via an ADSL router.  Both 
> > computers run Ubuntu (8.06 and 9.10).  I have set things up so that I 
> > can log into the router, and also SSH to both computers 
> > simultaneously: I use two different port numbers.
> >
> > In order to set everything up the way she wants it, I now want to be 
> > able to see her desktops, but I haven't figured out how to do this. 
> > Having read the Gnome help, I believe that the Gnome remote desktop is 
> > inherently insecure: I would prefer to tunnel things over SSH, 
> > probably using vncserver and vncviewer (or perhaps Vinagre).
> > 
> > Can anybody explain what I need to do to get this to work, please?

On Sat, 9 Jan 2010, Linda wrote:

> IIRC, you can use the -X switch on your ssh session and it will bring 
> you the desktop.

I'm not sure this is what you want, as it will allow you to start new X 
applications but not to see the whole desktop or to share it with your 
friend live.

You can port-forward VNC over SSH for each machine like this:

  ssh <friend> -p <port1> -L 5900:localhost:5900
  vncviewer localhost

  ssh <friend> -p <port2> -L 5900:localhost:5900
  vncviewer localhost

However you cannot run both of these at the same time, as both will try to 
use local port 5900 on your connecting client, and nor can you do it like 
this if you also run a local VNC server on port 5900 of your connecting 
client already. You could do something like this:

  ssh <friend> -p <port1> -L 5901:localhost:5900
  ssh <friend> -p <port2> -L 5902:localhost:5900
  vncviewer localhost:1 (connects to computer 1)
  vncviewer localhost:2 (connects to computer 2)

Hope this helps,

Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

More information about the Techtalk mailing list