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
/usr/local/bin/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.

email: crs23@bigfoot.com

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 crs@groundhog.pair.com.

______________________

Comments

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.

White Paper
Fabric-Based Computing Enables Optimized Hyperscale Data Centers

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions