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:

#Synergy - place this line somewhere before the "XSETROOT=`gdmwhich xsetroot`" line
/usr/bin/synergyc serverComputerHostname

Logout and now you should be able to login to Ubuntu with your server’s keyboard and mouse.

This entry was posted in Software. Bookmark the permalink.

8 Responses to Start Synergy before the Login on Ubuntu

  1. Yeorwned says:

    Excellent guide. I would have never thought to add the second entry so that you would be able to maintain clipboard use to the user session. Thanks for sharing!

  2. Stephen says:

    Why do you need to run synergyc twice?

  3. Dave says:

    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.

  4. brent says:

    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?

  5. Dave says:

    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

  6. Joe Baldwin says:

    So simple, yet works great. Thanks for taking the time to post this!

  7. lupco says:

    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!

  8. What’s up, always i used to check website posts here in the early hours in the daylight, as i like to learn more and more.

Leave a Reply

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