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:
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:
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
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.