I wanted to be able to make GDM login from another machine. Not XDMCP, not VNC. I want to be able to ssh into another box and make the GDM running on it log in. KDM has been able to do this for years, but as of GDM 2.20 (the one in Ubuntu Jaunty), GDM can't. So I hacked together this patch. It adds a command called RCLOGIN to the GDM fifo protocol.
First a warning. This is the first version of this patch that I think is stable and doesn't cause any other bugs, but I could be way off with this. Nobody has yet reviewed this patch. Since this patch is meddling with the security of GDM I would recommend that if the security of your box concerns you at all, don't install it!
These instructions download the Ubuntu Jaunty source of gdm, apply the patch and make a new deb package of the result. I'm not sure if this is the best way of doing things, but it worked on Jaunty. This is written using version 2.20.10-0ubuntu2 from the Jaunty repository. If another version appears, cross your fingers? (and watch for errors?)
Run as root / sudo / whatever:
mkdir gdm cd gdm wget https://www.loggytronic.com/dl/gdm-rclogin-6.patch apt-get install devscripts apt-get build-dep gdm apt-get source gdm cd gdm-2.20.10 patch -p1 < ../gdm-rclogin-6.patch dch -l local "rclogin6" debuild -us -uc
After all that completes, you should have a gdm_2.20.10-0ubuntu2local1_i386.deb in the parent directory. Install it:
dpkg -i gdm_2.20.10-0ubuntu2local1_i386.deb
After restarting GDM / your computer it should be active and ready to go.
Log into the box with the modified GDM from somewhere else. Then (as root):
cd /var/lib/gdm echo "RCLOGIN <username> :0" > .gdmfifo
If all went well, gdm should now log in. The :0 is the display name, so if you happen to be running multiple displays you can control which one logs in.
Next I need to get someone who understands GDM better than me to check it over to make sure it's playing well with the rest of GDM and security. Also I need to start investigating the GDM in Karmic and see how to apply this patch to that, then perhaps see if anyone wants to include it in Ubuntu??
Please, drop me an email to firstname.lastname@example.org if you found this useful! Or if you have comments, suggestions, a better patch ... etc.
Back to main page
12543 hits since 11/Jul/09