Is it possible to remotely (via ssh) make a login to GDM? I'll explain a situation in which I'd need this: I'm on my laptop and connect to my desktop via ssh. I realize there are some updates available. I install them all, but I need to reboot the computer. The problem is that once the desktop has rebooted, there will be no GDM session available, since it's necessary to log in. Can I somehow perform the GDM login remotely from my laptop?

Edit: I can't find FreeNX for Maverick, and I haven't been able to configure x11vnc + vncviewer to work. Isn't there an easy way?

2 Answers 2


Install x11vnc on the remote

We assume a working ssh setup has already been done.

user@remote: sudo apt-get install x11vnc

Remote login with GDM

We assume that a successful vnc setup has already been done.

user@remote:~$ sudo x11vnc <options>

x11vnc will use our predefinded VNC settings and passwords. For further options see the manpage and this nice and elaborate tutorial.

Remote login with Light DM

To access the Light DM login screen we need to submit the Xauhority file for Light DM

ssh user@remote
user@remote: sudo su
root@remote: x11vnc -auth /var/lib/lightdm/.Xauthority -display :0

View the remote screen

On the client side launch the vncviewer (e.g. from xtightvncviewer as follows:

vncviewer -via user@remote localhost:0

By localhost:0 we display screen 0 on the localhost. The option -via is for using ssh.

After typing in the password for the remote login we can proceed with the graphical login.

  • Exactly what should I do in the remote machine, and what in the local machine... Additionaly... would that run over shh (encrypted and such)?
    – luri
    Commented Feb 7, 2011 at 20:32
  • I'll have to install and configure vnc first... So it'll take some time to test both x11vnc and FreeNX (lil time to test... kids, also :) )
    – luri
    Commented Feb 8, 2011 at 15:31
  • When I issue x11vnc command on the remote machine, I get a dramatic warning about not having set a password and about everyone being able to see my desktop.... How do I set a password? Do I really have to set up one?
    – luri
    Commented Feb 15, 2011 at 20:02
  • Oh, and actually sudo x11vnc fails to start... says it can't find display
    – luri
    Commented Feb 15, 2011 at 20:12
  • What do you mean? I installed x11vnc on the remote machine, and xnc4viewer on the local one. I have an additional problem with the vncviewer command: I'm not using public keys, but password instead, and my ssh server does not run on port 22 (default).
    – luri
    Commented Feb 15, 2011 at 21:26

FreeNX. You log in graphically - same as sitting in front of computer. All of it happens tunneled though SSH. You'll love it.

  • Got to test both x11vnc and FreeNX... I'm quite concerned about security, tho, so I'd like to know which one is the safest.
    – luri
    Commented Feb 7, 2011 at 21:30
  • They both forward though SSH.
    – user8290
    Commented Feb 7, 2011 at 21:30
  • 1
    I just can't find FreeNX... It's not in the default repositories, and their ppa returns a couple of 404-type errors (i'm using maverick, btw)
    – luri
    Commented Feb 15, 2011 at 20:41
  • 1
    The commercial (free) edition is available. nomachine.com/download.php
    – user8290
    Commented Feb 15, 2011 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .