Control Everything from One Place with Synergy

Connect machines to each other and themselves using software instead of KM switchboxes.
Starting Synergy Automatically

Once you've tested the server and client(s), you'll probably want them to start automatically in the future. Synergy requires an X server, so starting it before the X server starts won't work. The easiest way to start Synergy automatically is to add a line to your $HOME/.xsession or similar X session startup script. Typically, you'd run the Synergy server from .xsession with no arguments and run the client with the server hostname as the only argument. They'd run in the background and quit when the X server quits or restarts.

The problem with this setup is Synergy isn't running during the login screen, which is managed by XDM or one of the eqivalents such as GDM or KDM. If you have the necessary permissions, you can reconfigure your display manager to start Synergy when the X server starts. First, copy $HOME/.synergy.conf to /etc/synergy.conf (no leading dot on the latter) so the display manager can find it. Then edit the display manager's Xsetup script; different distributions put this file in different places so you may have to search for it. Near the end of the script but before any call to exit add two lines. You can use either:

/usr/bin/killall synergyc
/usr/local/bin/synergyc guava

replacing guava with the hostname of your server to start the client, or:

/usr/bin/killall synergys
to start the server. Don't forget to remove any lines in your .xsession that try to start Synergy. For security reasons, some display managers (XDM and KDM, but not GDM) grab the keyboard and do not release it until the user logs in. This prevents a Synergy server from sharing the mouse and keyboard until the user logs in. It doesn't prevent a Synergy client from synthesizing mouse and keyboard input, though; log in to the server and then use Synergy to log in to the client.

Without the --no-camp option, the client tries connecting to the server every 60 seconds until it succeeds, so the client can start before the server. You can exploit this feature on a laptop: run the client on the laptop all the time. When it's attached to your home network, it'll connect to the Synergy server within 60 seconds. Then you can use the server's keyboard and mouse instead of the laptop's.

Finally, an important note about security. As of this writing, Synergy has no authentication and no encryption safeguards. Because it transmits all mouse and keyboard input, including passwords, do not use Synergy on or across untrusted networks. Future versions of Synergy will address this shortcoming.


Chris Schoeneman is a graphics software engineer at Pixar Animation Studios. In addition to Synergy, he's also the author of bzflag. He lives in Berkeley, California, and can be reached at



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Installing Synergy on Vista

Jonah Dempcy's picture

Great work on Synergy, Chris!

I'm an avid fan and just got around to installing it on my (relatively) new Vista laptop. Despite Vista not being officially supported, I'm happy to say I installed it without a hitch.

I wrote a walkthrough/tutorial for getting it installed and working in a Vista / Ubuntu combo (though the tutorial should work for any version of Windows and Debian-based Linux). Check it out:

Installing Synergy for Linux and Windows

I'd love to read this article but...

Anonymous's picture

... as someone who buys Linux Journal from the newstand in the UK, I'm a second class subscriber.

I guess all the anti-freeloading subscribers of LJ have paid contributions to GNU, FSF and Linus for the benefit they have recieved from their work as well, eh?

Stop being a crybaby. God.

Anonymous's picture

Stop being a crybaby. God.