Dual Screen Ubuntu – Windows XP with Synergy

21 10 2008

Truly, i cannot believe i had missed this piece of software up until a few weeks ago.
Here’s the description from the official page:

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own monitor(s).

Says it all, and was exactly what i was looking for.

Synergy works with a client server architecture. The box that i mainly use, runs Ubuntu 8.04, and i will be using this one as a server. The other machine, that i want to share the input devices with , is my laptop, that i will be booting into Windows XP. This one will be the server.

Then we’ll try them also the other way around.
At the end, a couple of troubleshooting tricks.

Synergy can be picked up from it’s Sourceforge page here.

Ubuntu as Server

For Ubuntu, it can be found in the repositories.

sudo apt-get install synergy

This will install two binaries:
synergys - the server
synergyc - the client

The installation will also create a configuration file in the home folder, .synergy.conf
This is what my file looks like:

section: screens
section: links
left = bender
right = dev

In the screens section, we place the hostnames of the boxes involved. For me, dev being the server and bender the client.

Since this is a quick miniguide to get it running, further details of configuration are outside of the scope. For other parameters check the very rich documentation of the software itself.

To run the server , on the command line type:

synergys -f
if you want the server to run in foreground, or simply
if once configured, you want it to run in the background.

Windows Xp as Client

After downloading and installing the windows binary, run it and define the name of the Synergy server, under "Other Computer's Hostname".

Test it. If the server is running correctly, it should all already work.

Windows XP as Server

After the installation, run Synergy, and on the main screen, choose to share this computer's keyboard and mouse. "Screen & Links : Configure".

The interface from here is quite intuitive. On the Screens section click the + button to add another screen, and underneath it, the relationship with the other screen.


Ubuntu as Client

On the Ubuntu box, after installation, to use it as a client, there is no further configuration needed.
The only thing to done is launch the client:

synergyc -f server.ip
to keep it verbose, or

synergyc server.ip
to leave it in the background.

Notes and troubleshooting
One of the biggest issues i had to get this running was getting the windows box to recognize Ubuntu's hostname. After some research this turned out to be quite the popular topic.

The solutions varied from adding
send host-name "thehostname";
at the end of /etc/dhcp3/dhclient.conf,
to installing winbind and adding wins to the nsswitch.conf file.

The fact is that an entirely different article could be written about this, but none of them worked for me.

The only hack-ish solution was installing samba and editing /etc/samba/smb.conf.
At the end of the Global Settings section, adding :
netbios name = dev

After resolving that, another issue was that while running Ubuntu as the server, the mouse was not properly responsive on the client. The same thing happened when Ubuntu was the client on the Ubuntu box itself.
Turns out this is a known bug with the newer Ubuntu versions. The solution is not the safest, but the only one working so far. Whatever you're running on Ubuntu ( client or server ), run it as root. Works.
Very important at this point is the location of the configuration file.
If synergys is launched as root with no extra parameters, will be looking for the .conf file in /root/.
Either move the file there, or launch it with the path parameter.

sudo synergys --config synergy.conf

Done and done.

About these ads



3 responses

27 04 2009
Ramona Hofbauer

Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader.

29 06 2011

Good tutorial, linux client and windows server worked fine for me, but then linux server and windows client connected to each other, but the mouse wouldn’t swap over. Running as root sorted it, thanks.

2 05 2012

I use the following command to connect my Win7 server machine from my Linux box (Ubuntu 12.04) (data between replaced since server and client is running within company net):
synergyc -d ERROR –daemon –log /home//synergyc.log –name –restart :24800
Quite regularly the client process dies and is not restarted. I’ve tried running the process with -f option and got error message ‘Segmentation fault (core dumped)’. Versions synergyc 1.3.8, protocol version 1.3 and server 1.3.8-Windows-x64. Any solution?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: