To those who don’t know, Synergy is a way to share a keyboard, mouse, and monitor that is attached to one master computer (server), and many other slave computers (clients). It’s similar to a KVM, but uses standard TCP/IP protocols to control the machines.

On a Ubuntu machine, you will run the following:

sudo apt-get install synergy

and this will install Synergy onto the machine. At this point, this isn’t assuming that your Ubuntu machine is the server or client. In my configuration, the Ubuntu machine is a client, and my Windows machine is the server.

http://synergy2.sourceforge.net/

Now comes the fun part, how do you configure synergy to startup during the boot process so that when you get to the username/password login screen, you can immediately use your server’s KVM to log yourself in. This is important, as I use to have to hook up a USB keyboard to the Ubuntu machine to type in the username and password. This is surprisingly simple to do as it requires two modifications to files.

The first is:

sudo gedit /etc/gdm/Init/Default

#Synergy – place this line somewhere before the “sysmodmap=/etc/X11/Xmodmap” line

/usr/bin/synergyc serverComputerHostname

The last is:

sudo gedit /etc/gdm/PreSession/Default

#Synergy – place this line somewhere before the “XSETROOT=`gdmwhich xsetroot`” line

/usr/bin/synergyc serverComputerHostname

Once you add the following lines into both files, you can log out of your session (or restart) and when you get to the login screen you will be able to use your server’s KVM.

There is one additional step that you may have to take, if you are reimaging the Ubuntu box and the server name changes, you will need to make sure to update the server name in the Synergy server’s configuration to ensure that it knows what machine is connecting and what orientation it has to your server (i.e. to the left of, to the right of, etc).