Search the blog

Synergy is a program that lets you share your mouse and keyboard over a network. So, if you have two or more monitors and more than one computer you only need one mouse and keyboard. Here’s how I got Synergy running with Ubuntu and OS X.

Synergy is also available for Windows – this how to does not cover Windows although Synergy works pretty much the same (in fact, it’s easier on Windows as there is a GUI to it)

Firstly, download Synergy for Linux – you can do this with the command sudo apt-get install synergy in the shell. For Mac download Synergy 1.3.1 for OS X here.

You need one machine to run as a server and then you can have a number of clients. In this example I will make OS X the server and Linux a client.

First off, find out the hostname of your Ubuntu machine by typing hostname in the shell. We’ll assume it’s called myclient in this example. Do the same in OS X and we’ll assume the Mac is called myserver.local.

The next thing we need to do is to set a configuration file for the server – this tells Synergy what to do with each machine when it connects.

Extract your downloaded Synergy folder in OS X and create a file in the folder called mysynergy.conf.

Enter this into your file and save:

section: screens
    myserver.local:
    myclient:
end

section: links
    myserver.local:
    right = myclient
    myclient:
    left = myserver.local
end
Your OS X hostname will end in .local – include this in the .conf file

All you’re doing here is defining your host and your clients and how they relate to each other.

Your server is ready to roll. Open up the shell in OS X and navigate to where your .conf file is stored; execute this command ./synergys -f –config mysynergy.conf

Open up a new shell and type ifconfig and make a note of the IP address that appears after inet – it will most likely start with 192.168. – let’s say it’s 192.168.0.5

Now open up your shell in Ubuntu and execute /usr/bin/./synergyc -f 192.168.0.5 (use your Mac’s IP address though).

All being well your Ubuntu machine should connect to your Mac and you can use your Mac’s mouse and keyboard on your Linux machine.

One limitation is that the Mac Synergy server will only accept an IP address rather than a host name so it’s a pain if your Mac’s IP address keeps changing.

Tim Bennett is a freelance web designer from Leeds. He has a First Class Honours degree in Computing from Leeds Metropolitan University and currently runs his own one-man web design company, Texelate.