Software

Start Synergy before the Login on Ubuntu

If you have a Linux Synergy client connecting to a Synergy server on another machine, you’ll want the client to start up with GDM so that you can access the mouse and keyboard to log in. Here’s how to get it working Ubuntu, although it should work on other distributions too.

Edit the Default file

sudo gedit /etc/gdm/Init/Default

and add these lines to it

#Synergy - place this line somewhere before the "sysmodmap=/etc/X11/Xmodmap" line
/usr/bin/synergyc serverComputerHostname

Where serverComputerHostname is the host name or IP of your Synergy server.
Also edit the PreSession/Default file:

sudo gedit /etc/gdm/PreSession/Default

And add these lines to it:
[code=php]#Synergy – place this line somewhere before the “XSETROOT=`gdmwhich xsetroot`” line
/usr/bin/synergyc serverComputerHostname[/code]
Logout and now you should be able to login to Ubuntu with your server’s keyboard and mouse.

8 thoughts on “Start Synergy before the Login on Ubuntu

  1. The Init/Default file runs Synergy at the login screen. The PreSession\Default file runs Synergy after you login. You need both unless youre running Synergy from another location.

  2. I’m confused, as I’m VERY new to both Linux and Synergy. I’m confused because you instruct us to add a couple lines to the /etc/gdm/Init/Default file, but the 2 lines that you instruct us to add, seem to have instructions of their own. Am I to copy and paste both lines and add them anywhere in the file? Or am I to add just the line “/usr/bin/synergyc serverComputerHostname” and place it “somewhere before the “sysmodmap=/etc/X11/Xmodmap” line”

    Can you be more exact about what lines (specific) get added, and where (specifically) in the file they get added?

  3. Hi Brent,
    Add the following line to /etc/gdm/Init/Default just before the “sysmodmap=/etc/X11/Xmodmap” line

    /usr/bin/synergyc serverComputerHostname

    And add the following to /etc/gdm/PreSession/Default just before the “XSETROOT=`gdmwhich xsetroot`” line

    /usr/bin/synergyc serverComputerHostname

  4. Thanks for sharing.
    But in my Ubuntu 10.10, I don’t see “XSETROOT=`gdmwhich xsetroot`” line in the /etc/gdm/PreSession/Default file. Is there any change? thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *