2 Computers via 1 Keyboard & Mouse

Do you have multiple computers on your desk? Is one of them a laptop that is sat off to the side a bit? Have you ever wished that you could get rid of all but one of the keyboard / mouse combos that clutter your desk or that your laptop was easier to control? If so then Synergy is the answer to your woes.

Synergy (synergy2.sf.net ) allows you to use the keyboard and mouse of your primary computer to control all the other computers around you. Best of all, it is free, works with Linux, OS X, and Windows. There is one pitfall though... Synergy has not been updated since 2006 but have no fear because it has been forked to a new project called Synergy+ (http://code.google.com/p/synergy-plus) and they are working to squash the bugs that have arisen plus add new functionality. Below is an explanation of Synergy (taken from the Synergy+ home page):

Synergy+ (synergy-plus) lets you easily share a single mouse and keyboard between multiple computers with different operating systems, without special hardware. All you need is a LAN connection. It's intended for users with multiple computers, where each system uses its own display. It's a little like having a 2nd or a 3rd desktop...

Synergy+ Example Pic

In the above picture you could just as easily substitute a laptop for any one of these machines. Client computers can be to the left, right, top, or bottom of the server's screen or any other clients screen. For example, imagine a shelf just above the monitors in the above picture that holds your laptop and monitors for two other computers. Then imagine a shelf above that with a bank of 5 more monitors...

As a side note, if you run a dual monitor setup then the "screen" is the combined real estate of both monitors. Synergy supports mapping a certain percentage of the screen to be aligned with a percentage of another screen. The means that if your dual monitor setup uses matching monitor resolutions you could have 50% of the screen's top edge (one monitor's worth) mapped to the edge of one client and the other 50% (the second monitor) to another client.

Synergy does have some shortcomings when it comes to security but they are easily overcome. Quoting the Synergy2 site:

Synergy does not do any authentication or encryption. Any computer can connect to the synergy server if it provides a screen name known to the server, and all data is transferred between the server and the clients unencrypted which means that anyone can, say, extract the key presses used to type a password. Therefore, synergy should not be used on untrusted networks.

However, there are tools that can add authentication and encryption to synergy without modifying either those tools or synergy. One such tool is SSH (which stands for secure shell). A free implementation of SSH is called OpenSSH and runs on Linux, many Unixes, and Windows (in combination with Cygwin).

So, to secure Synergy you can either tunnel it through SSH or do like I do and configure a private VPN between your computers using OpenVPN and run Synergy over it. OpenVPN is available in most Linux distributions or you can download it directly from their site.

As a final tip, be sure to set your clients to run Synergy (and OpenVPN if used) automatically so that you can login without having to break out the spare keyboard and mouse again. This is particularly easy in Gnome. At the end of /etc/gdm/Init/Default, just before the line that says exit 0 add the following:

/usr/bin/killall synergyc
while [ $(pgrep -x synergyc) ]; do sleep 0.1; done

Now, go clear those extra keyboards off your desk!


Gene Liverman is a Systems Administrator of *nix and VMware at a university.


Comment viewing options

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

kvm switch with rackmount monitor

rackmount kvm's picture

KVM Switch is used to connect multiple computers keyboards and mouse. It is a very good device to connect in an easy manner. There are many verity of such switch like usb, ip, dvi etc.

kvm switch

This works great really this

homejobs's picture

This works great really this is help full in case we have more data on the screen to manage...

Being a daytrader some years

Dalton Stewart's picture

Being a daytrader some years back I so needed a platform like this. You should have seen the mess of monitors and computers I had teathered together. But as always now that I don't need them they come out with easy to use applications like this.

Apartment Sofa


habika's picture

I have used this application for quite a while, and it seems to work very well for me. I know that it was essentially a dead project, but I didn't know that it was forked. I can't wait to see how this goes. It's multi-platform-ness makes it a great tool for work, where my desk is a complete mish-mash of systems.
Used Furniture


Anony-mouse's picture

First I've heard of this. I no longer have 2 computers, but when I did, I used xdmx+xinerama to run a single X server across both systems - thus controlling it from one keyboard/mouse across both screens. Thanks to SSH, could also run programs on both systems.

Would be interested in seeing a comparison of xdmx and synergy+

How many monitors?

JSF's picture

I don't get it! I am currently using a KVM with a dual screen capability and 4 inputs from 4 computers. It is not perfect and seems to make some parts of the screen a bit out of focus/blurred and sometimes repeats keystrokes - but it is usable. If I want to use Synergy do I need to fit 8 monitors on my desk???

Well if you have 4 computers

Zach Schneider's picture

Well if you have 4 computers you only need 4 monitors, 1 keyboard, and 1 mouse.

Zach Schneider is a web developer and Linux enthusiast. Find him on Twitter, @ZKM.

But I can't afford to buy 4

JSF's picture

But I can't afford to buy 4 monitors that are 3840 x 1080 pixels! And they wouldn't fit on my desk. (I hope I'm not being facetious.) I currently use two monitors that are each 1920 x 1080.
I use MS-Windows computers running 3DS-MAX and Linux computers running computational fluid dynamics software. Both involve large 3D models so I like to have local graphics - hence the KVM switch rather than using rdesktop from the Linux side or X-win32 from the MS-Windows side - which some of colleagues use. Others use VMPlayer to install Linux under MS-Windows but I don't like that either. If I understand it correctly Synergy is only useful if you are happy to fit separate monitors for each computer on your desk?
I can see it would be useful for connecting a full size keyboard to a web-book or a mobile phone.


Gene Liverman's picture

You are absolutely correct. Synergy is designed for someone who is using multiple computers that each have locally attached monitors. In your case I think you have made a very wise decision to utilize a KVM switch and do not see how Synergy would help unless you magically got a larger desk or wanted to stack your monitors. By stack I am referring to using a stand or a shelf so that some of your monitors are sitting in their normal location on your desk and one or more of them are above the others. Just for a visual reference, hear is an example of a stand that would enable this: http://www.amazon.com/Ergotron-Quad-Panel-Monitor-Stand/dp/B000E9BY1G

Gene Liverman is a Systems Administrator of *nix and VMware at a university.


David Lane's picture

I had forgotten the name of the program. I used to use it all the time and then changed hardware and forgot to copy it over. Now if I could remember the name of the program that disables the touchpad when I am typing...

David Lane, KG4GIY is a member of Linux Journal's Editorial Advisory Panel and the Control Op for Linux Journal's Virtual Ham Shack

copy paste form such program

Anonymous's picture

copy paste form such program page:

Annoyed when you are typing a document and accidentally the palm of your hand brushes the touchpad, changing the position of the cursor in your document or accidentally clicking on an option. TouchFreeze is simple utility for Windows NT/2000/XP that solves this problem. It automatically disables touchpad while you are typing text. Like syndaemon on x-windows.

Good stuff I'm using synergy+

Anonymous's picture

Good stuff I'm using synergy+ daily, one issue I noticed is the client struggles and crashes trying to reconnect if the server goes away.

I'll Stick With KVM

jwmort's picture

I'll stick with my inexpensive KVM.

Yeah. KVM switch Easy as abc,

Anonymous's picture

Yeah. KVM switch Easy as abc, why fix it if it ain't broken


Seanbo's picture

You MAY WANT to see all monitors at the same time...and if I remember correctly... Copy and paste between machines.

both worlds

crlsgms's picture

I use synergy at work for about 2 years, and its a real quick tool for multi desktop environments. At home I dont got much monitors as I have at work, so Kvm still useful for this.

Mostly both tools got different approaches, hard to compare different stuff like saying that one is better than another.

If you're sticked to the kvm, its a must trying to put a second monitor and give sinergy a try, but if you're not much into multi tasking, an oldschool kvm will do the job.

KVM is limited to only 1 monitor

Zach Schneider's picture

KVM is limited to only 1 monitor and plus synergy is free much less than your cheapest KVM

Zach Schneider is a web developer and Linux enthusiast. Find him on Twitter, @ZKM.

Plus, the KVM's I've used

Anonymous's picture

Plus, the KVM's I've used don't seem to properly transmit scroll actions from my mouse (in my case, an Apple Mighty Mouse, with a 2d scrolling trackball). Not even to hosts that support the capability. So, if I hook the mouse directly to my Mac: 2d scrolling. If I hook it up to my KVM (any of the 3 models I've tried), and use that exact same mouse to control that exact same Mac: no scrolling at all.

It sounds like if I used Synergy+ with the Mac as the server, and my Ubuntu machine(s) as the client(s), then I might still have full scrolling on the Mac (not as important on the Ubuntu machines).

Another issue: Bluetooth mice and keyboards. I haven't seen a "KVM" for those yet. But, with this, it sounds like I should be able to have them paired to one host, and use that host as the server for the group of systems.

Further, I can have an environment that's similar to a multi-screen computer, with different architectures on each screen. That seems rather ideal to me.

Copy Paste

Gene Liverman's picture

Plus, when was the last time you saw a KVM that allowed copy / paste between machines? Never would be my answer.

Gene Liverman is a Systems Administrator of *nix and VMware at a university.

KVM? are you talking about

Tulga's picture

KVM? are you talking about hardware?

KVM Switch

Gene Liverman's picture

Yep. See http://en.wikipedia.org/wiki/KVM_switch for details.

Gene Liverman is a Systems Administrator of *nix and VMware at a university.

Can't work w/o it!

Toky's picture

I've been using synergy for about 3 years now and its a life saver! I have my work laptop (windows for outlook only) with my workstation (*nix) and since I have some systems displaying stats on monitors hanging around me I use Synergy to get to them all.

I do wish there was a way to "ping" the cursor.

@ metalx2000

You don't really need a server, that's how the host that has the keyboard + mouse that you are using to control the other systems is called. But they both run the same software you just click on a button to say if that host is sharing (serving) its keyboard+mouse or if the host is connecting (client) to another host.

Even-though the cfg file is easy to work with, there is a graphical tool for *nix to aide in the configuration of synergy, its called quicksynergy ( http://code.google.com/p/quicksynergy/ )


Anonymous's picture

Well spotted - a very useful capability. I've just gained some desk space :)


Gene Liverman's picture

Glad this helped you out! It is always nice to hear about the fruits of your after an article is published. :)

Gene Liverman is a Systems Administrator of *nix and VMware at a university.

Great Application

Zach Schneider's picture

I was actually going to write an article about this great application, but I couldn't find a way to compete with Chris Schoeneman the person who actually wrote the application and posted this article Control Everything from One Place with Synergy

Zach Schneider is a web developer and Linux enthusiast. Find him on Twitter, @ZKM.

Why not use VNC? Over 100Mbps

Anonymous's picture

Why not use VNC? Over 100Mbps connection it's almost like you are there. You can't game with it though of course.

VNC vs Native

Gene Liverman's picture

VNC is great for a remote connection but why would I want that when I have the native monitor for the other computer on my desk? That is what Synergy is great for. Everything is native and local. It is not being rendered remotely ever.

Gene Liverman is a Systems Administrator of *nix and VMware at a university.

vnc2vnc and x2vnc both do the

Anonymous's picture

vnc2vnc and x2vnc both do the same thing. I would not be at all surprised to find that synergy is built on on vnc libraries. If you are going to us VNc for this that would be the better choice.

Synergy is great

Grant Wagner's picture

I have used this application for quite a while, and it seems to work very well for me. I know that it was essentially a dead project, but I didn't know that it was forked. I can't wait to see how this goes. It's multi-platform-ness makes it a great tool for work, where my desk is a complete mish-mash of systems.


metalx2000's picture

Synergy is fine if you need to have a Windows machine in the mix, other wise I proofer x2x. The main advantage I see to x2x is that you don't need a server and client. You only need x2x installed on one machine and it can be either the client or server.

Everything you ever need to know about Open-Source Software.

x2x doesn't just assume "no

Anonymous's picture

x2x doesn't just assume "no Windows machines". It also assumes "no Macs".

So, really, your statement would more accurately be: "Synergy is fine if you need to run any non-trivial environment, otherwise, you can run x2x [if you're in a trivial environment]".

Where trivial refers to number and choice of display models (X, Win, Mac), not number of systems, security environments, nor network topologies.

Sorry, I thought that Mac's

metalx2000's picture

Sorry, I thought that Mac's used X since they can handle X forwarding with ssh. If not, then I guess I was mistaken. I still prefer x2x over Synergy with working with non-Windows and non-Mac machines.

Everything you ever need to know about Open-Source Software.

There are X displays you can

Anonymous's picture

There are X displays you can run on top of Mac OS X (Apple even provides one), but they're not the native windowing model, and not everyone runs them. I have no idea whether or not something like x2x would work with them (or if it would be limited to controlling X apps, and not native apps).


Gene Liverman's picture

There at least used to be one called OSX2X if the Mac was the one with the keyboard and mouse... never liked it though.

Gene Liverman is a Systems Administrator of *nix and VMware at a university.

One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix