20080426

Ubuntu 8.04 Hardy Heron Synergy Client Setup

In the Teknynja cave I have a MS Windows XP box with two monitors (my main development system) and a Ubuntu box with one monitor (my Internet offload system). I use Synergy to control the Ubuntu system using XP's mouse and keyboard. Since the Ubuntu box doesn't have a keyboard or mouse connected to it, a little hacking is required to get the Synergy client running before the login screen. I've been doing this with my Ubuntu 7.04 system for a while, and now that I am setting up a replacement Ubuntu 8.04 system, I thought I would document the Synergy client setup for future reference. It should be noted that I installed Ubuntu Hardy Heron from the Alternate CD, but that should not make a difference for this procedure. I also assume that you already have the Synergy keyboard/mouse server configured and running somewhere on your network.

First, install Synergy on the Ubuntu system using:

sudo apt-get install synergy

Then edit the gdm initialization file:

sudo nano /etc/gdm/Init/Default

and add the following lines just before the “sysresources=/etc/X11/Xresources” line

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is the IP address of your server machine.

Now edit the gdm pre-session file:

sudo nano /etc/gdm/PreSession/Default

and and the following line just before the “XSETROOT='gdmwhich xsetroot'” line

/usr/bin/synergyc xxx.xxx.xxx.xxx

Make sure the Synergy server is configured and running on your keyboard/mouse system, and reboot the Ubuntu system. You should now be able to move the mouse over to the Ubuntu screen and login normally.


Note that I still consider myself a Ubuntu/Linux noob, and so any improvements/comments/suggestions you have about this post are greatly appreciated. Ymmv. Most of the help I needed setting up this configuration came from the Ubuntu Synergy How To page.

6 comments:

Pat McGroin said...

Excellent Guide....I have long struggled with how to get synergy to work at log in. This worked perfectly. Thank You very much.

Anonymous said...

nano? really? come on vim is the best! ;)

Thanks for the tip, the synergy lag was unbearable

Anonymous said...

amazing that worked great!

Unknown said...

Hi there. Like the others, this worked great for me, however once on my Ubunut machine from my VIsta box, it is stuck there - I couldn't get the mous back onto the Vista box. I had to kill the process, and because it's running as root, I had to sudo kill PID etc.

What do I need to edit to get this working seamlessly?

Thanks for the good blog :)

teknynja said...

Synergy has a known issue with Vista, you simply have to make sure it runs as administrator. There is a good write-up on how to fix this at http://www.howtogeek.com/howto/windows-vista/fixing-problems-with-synergy-on-windows-vista/

You should also check the configuration on the server machine to make sure that you have entries for both directions (Vista to the left/Ubuntu to the right) or something similar. If you don't tell synergy about both directions, it can get stuck as you describe.

Hope this helps!

teknynja said...

Oops - it seems that url above got cut off, so i'll try it this way - HowToGeek: Fixing Problems with Synergy on Windows Vista.

 
Template design by Amanda @ Blogger Buster