Sign up ×

How do I programmatically and remotely (using SSH) log-in a user so that the lightdm login screen closes and loads the user's desktop as thought they had physical typed in their username and password?

I have a vanilla Ubuntu 12.04 Desktop setup, and I'd like to be able to start a desktop application remotely via SSH. I've already accomplished this by specifying export DISPLAY=:0, however, the assumes there's already an X-session running.

Edit: I do NOT mean VNC/RDP/Nx. I mean literally logging in the physical terminal, but when you're not at the physical terminal. Imagine someone was sitting down in front of your physical Linux computer, and you want to let them log-in, but you don't want to give them your password. Instead, you SSH into the box, and run a script to log them in and start a desktop session.

share|improve this question
Not quite what was asked but you may be also happy with a VNC solution: –  Takkat May 5 '12 at 22:06

1 Answer 1

Why don't you try a program designed for ssh remote login. Details can be found here:

Just add the program to startup list and give required params.

share|improve this answer
Please see my edit. –  Cerin May 5 '12 at 22:30

Your Answer


