Ubuntu Reference Guide

part of the WillPowered Inc. network
© 2011 William Hall <5/> - This site uses HTML5


Synergy is a virtual KVM, letting you control multiple computers with just one keyboard and mouse and no fiddly hardware to install.

I use the synergy client with a Windows 7 desktop acting as a Synergy server and a Mac computer as another client. This is anecdotally the best way to run it. To keep things simple, the Ubuntu and Mac computers log in automatically without me having to enter a password. This is because getting Synergy to run at the login stage is tricky. This also works best if the computers have a static IP address so nothing can get confused.

Simply run the following commands to install synergy and create the config file.

$ sudo apt-get install synergy $ sudo nano /etc/synergy.conf

The config file is simply a map of the connections and how they work. The config has to be the same on all computers otherwise your mouse (and keyboard) will get trapped on one of the screens! Mine looks like this:

section: screens WP-02: WP-05: johnnie: end section: links WP-02: top = WP-05 left = johnnie WP-05: bottom = WP-02 johnnie: right = WP-02 end

It is likely that you will discover the @ symbol becomes omega on ubuntu. To fix this create a .Xmodmap file in your home directory with the following content.

keycode 24 = q Q at at at at

Reboot and ubuntu will ask if you want to load the Xmodmap file you just created and never ask about it again.

The final thing to do is to get synergy to start with the rest of the computer and the easiest way to do this is in your System, Preferences, Startup Applications. Add an entry that runs the following command, where <SERVER IP> is the IP of the computer with the synergy server on it.

synergyc <SERVER IP>

Here are some notes about the retro way to force synergy to start with login.

$ sudo nano /etc/gdm/Init/Default /usr/bin/killall synergyc while [ $(pgrep -x synergyc) ]; do sleep 0.1; done /usr/bin/synergyc <SERVER HOSTNAME> (before "exit 0") $ sudo nano /etc/gdm/PostLogin/Default /usr/bin/killall synergyc while [ $(pgrep -x synergyc) ]; do sleep 0.1; done $ sudo chmod +x /etc/gdm/PostLogin/Default $ sudo nano /etc/X11/Xsession.d/85synergyc /usr/bin/killall synergyc while [ $(pgrep -x synergyc) ]; do sleep 0.1; done /usr/bin/synergyc <SERVER HOSTNAME> $ sudo chmod +x /etc/X11/Xsession.d/85synergyc