synergy: sharing the keyboard and mouse

January 16th, 2008 edited by Tincho

Article submitted by Carles Pina from Catux-LUG. And guess what? We still need you to submit good articles about software you like!

There are many occasions at which a user needs to use two computers at the same time, even with two different operating systems, all in the same desktop. One of the most annoying things that might happen is that you will need to use a different set of keyboard and mouse for each computer with the resulting waste of space on your table.

One of the first solutions that firstly came to mind was to use only one set of keyboard and mouse to access the other computer through some kind of terminal software such as VNC, ssh, FreeNX,… but, sometimes we would prefer to really use the other computer, providing us with access to two real screens (very comfortable), for graphical design tasks, games, closer feeling to the user interface, etc. This is the case we are going to talk about.

What is synergy?

Synergy is a multi-platform client-server program designed to share the same keyboard and mouse for different computers connected by network.

How do yo use it? (in other words, how to change from one computer to the other): The basic usage consists of just moving the mouse pointer from one screen to another, though it also includes some kind of protection for those cases when the pointer is at the corner of the screen for other purposes like closing a window using the x at the top-right. Nevertheless, the option to configure a keyboard shortcut to move between screens is given.


The configuration is pretty straightforward: you need to define the screens’ layout (which screen is situated on the right, left, top, bottom).

For example, if we had two computers, one called “desktop” and the other one “laptop”, and we wanted to use the keyboard from desktop (then desktop will act as the server), we need to write the following configuration file in /etc/synergy.conf, or any location if we started synergys with the --config PATH_TO_CONFIG flag.

section: screens

section: links
        right = laptop
        left = desktop

Computer names are the same name the hostname command reports.

Then, in the computer that acts as server we will execute, to read the configuration from /etc:

$ synergys

Or, to read the config from our home directory:

$ synergys --config ~/.synergy.conf 

And then, in each client computer:

$ synergyc SERVER_IP

If we have problems, we can track them using:

$ synergyc -f SERVER_IP


In the project’s webpage you can find very good documentation.

Please note that synergy doesn’t offer secure connections yet, but we can use any VPN or SSH tunnel to avoid our sessions being captured in the network. See the security page in the project’s website.

Also check the quicksynergy package, which is a graphic user interface for synergy.

Synergy has been available at the Debian and Ubuntu repositories since long ago.

Thanks a lot to Fran Hermoso for the extensive text correction and improvement and to Peral for showing me synergy.

Posted in Debian, Ubuntu |

14 Responses

  1. Sigjuice Says:

    Another neat synergy feature is clipboard sharing. Cut and paste works between the two computers even if they are running different operating systems.

  2. mlegmig Says:

    Indeed Synergy is a great tool. Unfortunately,
    what you didn’t mention is that Synergy’s development seems to have ceased - and that it does’n work well under newer X versions (have a look at the Ubuntu forums, for example, there’s a long thread about freezes and massive lags) which might to be related to the xcb library.

  3. René Schmit Says:

    if you use X only, give x2x a try, it is very lightweight and quite reliable.

  4. Bane Says:

    Hey, I think it should be:

    section: links
    right = laptop
    left = desktop

    They can’t be both on the left, right?

  5. Marius Gedminas Says:

    I’ve been using x2x through an ssh X tunnel for this:

    ssh -X othermachine x2x -west -to :0

  6. Rob Funk Says:

    I use x2x (over ssh) for this every day.

    If you want to do the same with Windows, there’s x2vnc.

    (I’ve tried x2vnc with a Mac too, but it was too slow, apparently due to translating the Mac 3D effects to VNC.)

  7. JollyJumper Says:

    There is another Project called Mango Lassi, which claims “Synergy done right”

  8. akhbit Says:

    Synergy is cool but what I’m lookin for is to use second computer as an extra monitor with my laptop. I saw an demo of this somewhere but now I can’t find a software/method for the task.
    Any suggestions?


  9. Tincho Says:

    Bane: corrected, thanks.

  10. John Carter Says:

    I was using x2vnc, worked well except didn’t do the clipboard thingy.

    Alas, neither synergy nor x2vnc allow placing xinerama or placing a window from one host on another.

    (I have a Ubuntu / Win2k pair)

    I tried mucking about with Xming on the Win2k and x2vnc but it was very flaky.

  11. dublpaws Says:

    akhbit, you can set up synergy, then from the secondary machines run

    $ ssh -X yourself@laptop
    $ gnome-session (or whatever)

    This will give you an extra monitor

  12. cant2 Says:

    ’synergy’ is dead jargon. it has been rendered meaningless by constant misuse. suggest that you attempt creativity in future. i mean how stupid do want to appear?

  13. Darkstriker Says:

    This Program is A BLESSING.

    Works Fabulously also on Windows and MacOS X.

    Just great.

    Replaces the 30$-80$/machine Multiplicity which consumes far more resources.

    Good work!

  14. Anonymous Says:


    MaxiVista might be the software you are looking for. It allows you to use another PC as an additional monitor.