One Keyboard and mouse, Many OS’s, Monitors and Computers

Today I’m going to talk a little bit about Synergy. Synergy is a free (as in beer and speech) piece of software that allows you to use one keyboard and mouse with multiple computers. This differs from a traditional KVM in a couple ways. 1. You get the added screen real estate as each machine needs their own screen 2. You don’t need additional hardware the keyboard/mouse switching is done over your existing network. The advantage of this is that Synergy is cross platform, there are currently Synergy clients for OS X, Linux and Windows (No official support for Vista however, It may be possible but your mileage may vary. let me know how you make out if you try it) so you can have a Windows XP machine on the left monitor an Apple machine on the center monitor and a Linux machine on the right monitor or you could have 3 machines all with the same OS.

Now some of the caveats I found

  1. Make sure the machine that needs to be the most responsive is your server machine. I have notice a little lag in the mouse and keyboard when there’s a lot of network traffic
  2. Again no official Vista support yet and I don’t expect it anytime soon as this project seems to have stagnated for the most part. There hasn’t been a new release since Apr 2006

With that said in my testing synergy was very stable. I’ve experienced zero problems with it in Apple’s Leopard OS thus far.

So the general idea is that one computer is going to be the keyboard and mouse server and “share” it’s keyboard and mouse with the other machines. I would advise this be the machine that runs the most time/lag sensitive applications. If you use a machine for gaming make this machine the server. any other machines need a monitor and to be connected to your network but you can remove the keyboard and mouse once synergy is setup.

We need to download the Synergy package to all our machines. Download the applicable package here There are pre-built packages for Windows, OS X, And an RPM package for RPM based Linux distributions. If none of these apply to you you’ll need to build it from the source packages or check with your Linux distros package repositories to see if they have a version pre-built for your OS.

Once the synergy package is downloaded install it. On Windows this means running the “SynergyInstaller” executable, in OS X it involves double clicking the .tar.gz file that you download and placing the resulting folder somewhere (eg Applications folder) and in Linux it will usually involve installing the rpm

rpm -ivh synergy-1.3.1-1.i386.rpm

for example

Once we have the package installed we can move on to configuring it. Lets start with configuring the server.

In Windows you have a GUI available by default so I’m not going to go into the the server setup on Windows as you should get the idea from the config file syntax we’ll go through in a moment.

Before we go any further make sure all the computers involved are configured with static IP addresses. This will make things a whole lot easier.

we need to create a file called synergy.conf and we’re going to create it in the /etc/ folder so lets type

touch /etc/synergy.conf

Then open it up in your favorite text editor

The basic form we want to follow is

    section: screens

    section: aliases

    section: links
    left = computer2
    right = computer1

    section: options
    screenSaverSync = true

Now the first section defines the available screens we’re just defining the screens here so just list off your computers each name must be unique and followed by a colon (:). I also highly recommend that you use the hostname of the computers for these (this is the computer’s network name on win32 and the name reported by running hostname on *nix and OS X. Remember to drop the .local in OS X if its tacked on to the end)

The second section defines aliases that the client computer can connect to the server as. I recommend adding these in the following format.

name:IP address

but you can also use alternate hostnames instead of the IP address

The next section defines where each monitor is in relation to the rest. You must explicitly define each neighbor for each monitor for example if you only define that computer2 is to the left of computer1 but don’t define that computer1 is to the right of computer2 then once you move your mouse pointer to computer2 you won’t be able to get it back to computer1. The directions you can define the screen locations are left, right, up and down.

The last section here is the options section. This section actually isn’t needed but it does have a pretty cool feature that I like “screenSaverSync” if you set screenSaverSync to true it will try to sync the screensaver between all the computers so once it turns on on one it turns on on all of them. Some systems seem to have trouble with this option so if you run into any trouble turn it off.

Once we have the config file all setup save it and quit your text editor.

To start up the Synergy server go to a terminal window and type

synergys --config /etc/synergy.conf

This will start up the synergy server.

Now the clients require pretty much no configuration

simply type the following to start the OS X or Linux clients up


just replace with the IP address of your Synergy server.

And to start the Windows client launch the Synergy application. Tic off “Use another computers shared keyboard and mouse(client)” and enter the IP address of the server in the “Other Computers Host Name” box. then click on start and you’re all ready to go.

If you don’t feel like messing around with all this text file and command line configuration on OS X and Linux you can try using QuickSynergy it’s another free (as in beer and speech) application that adds a user friendly GUI to Synergy.

As always if you have questions or comments please post them in the comment section below.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Published by


I'm a self labeled Nerd who enjoys Playing Video Games, restoring classic muscle cars (i have a 65' Mustang in the works) , Running Big Data Clusters, Tattoos, Working on System Automation, Riding and customizing Motorcycles, and writing python Code. I'm an SRE with DemonWare/Activision Specializing in Big Data/Hadoop operations but all opinions and views expressed on this site are solely my own.