How to share a mouse and keyboard across multiple computers

Synergy is an open source software alternative for a physical KVM switch.
447 readers like this
447 readers like this
Technical documentation doesn't have to be dull

Opensource.com

When I first started doing cross-platform development I used a KVM switch to share my mouse, keyboard, and monitor between several physical systems. I also used VNC and remote desktop software to see what things looked like on other operating systems. Then I obtained a second monitor, which gave me multiple options for different window layouts.

Eventually, I stopped using the KVM switch, and ended up with a mess of keyboards and mice strewn all over my desk. It was at this point, well over ten years ago now, that I discovered Synergy, an open source software replacement for a physical KVM switch.

Synchrony layout screen.

Back then it did not have any kind of graphical interface to configure your desktops, but it did have a simple text configuration file for the server where you expressed where each monitor was in relation to the others. I always used a simple layout, such as the one shown above, to share my keyboard and mouse. Each machine gets its own monitor(s), and the client machines connect to the server (which has the keyboard and mouse physically attached) to receive events. The interface in the screenshot above (taken on a Linux system) is all new, and it enables you to graphically layout your screens using a friendly Qt-based interface.

I generally run the server on my Linux machine, and the one at work has two 4k monitors attached to it. I have a Windows test machine to the right of my main screens, and a Mac machine to the left. I have also run configurations that included laptops. The way it works is quite simple: The software sets the screen edges as special areas, and when you push to the edge of the screen your mouse will appear on the other monitor. You can copy and paste between operating systems, and applications cannot tell that the mouse and keyboard are remote.

For me the graphical interface has some layout issues. I work on a 4k monitor under Linux and the initial view is quite squashed (see above), but that is easily fixed by resizing. The server configuration dialogs all work well, with an intuitive and well-thought-out layout. I think Synergy is the best software available for anyone who would like to run multiple physical machines that have their own monitors and share a mouse and keyboard. It has been for quite some time, and it has seen a number of improvements in the last few years. There is a great deal of value in cross-platform development in seeing your application as it performs natively on different operating systems, and on different hardware.

The Pro version includes SSL support, but I have always used Synergy on a private switch between those systems and never really worried about it too much. You can download the source code for free, and the precompiled binaries must be purchased. In my opinion the fee is quite reasonable, with a Standard and Pro version available. The payment is one time for unlimited downloads and upgrades, and it is used to help fund development of the project.

I really enjoyed checking out the latest version, and intend to buy a license. Even though I don't particularly need it right now I may go for the Pro version as I prefer to encrypt as much as is reasonable, and I have benefited from this software for many years. Are there other solutions you employ to share a keyboard and mouse seamlessly across machines/monitors? This is a great software-only solution that has been around for many years.

Marcus D. Hanwell
Marcus D. Hanwell | Marcus leads the Open Chemistry project, developing open source tools for chemistry, bioinformatics, and materials science research.

5 Comments

Yes! Synergy is amazing! I agree 100%.

Their site is very confusing. There is a "lifetime access fee" of $29, but links to a github repository at the very bottom of the page in a tiny logo. What gives?

I don't think that the program has made it into the debian archive yet, though it is in fedora. https://admin.fedoraproject.org/pkgdb/package/rpms/synergy/ . Their web-page really needs work

Quoting from my article above "You can download the source code for free, and the precompiled binaries must be purchased." So the code is open source, and they charge a fee to get lifetime access to precompiled binaries. They also provide instructions on compiling the code yourself if you wish to, and this is how the company is funding development while keeping the project open source. It is packaged on many Linux distributions, I use the package on Arch Linux.

In reply to by MaiSelf (not verified)

Thats great, but they really really should explain that on their site. Its a real turn-off.

I'm running xubuntu with four 'desktop's - can I use each one of these as the 'window' onto another machine?

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution 4.0 International License.