I'm trying to get Synergy, which is a keyboard and mouse sharing tool, to autostart on a second desktop. I'm using the distro BunsenLabs which is based on Debian Jessie on both desktops, and so I have LightDM as displaymanager and Openbox as windowmanager.

The computer which has the keyboard+mouse physically attached is called the server and runs synergys. The computer controlled by the virtual keyboard+mouse is called client and runs synergyc

So, on the client I added the following line just below [SeatDefaults] to /etc/lightdm/lightdm.conf :


I also added this line to ~/.config/openbox/autostart :


When I boot everything works as it should; I can use the keyboard+mouse from my primary desktop on my secondary desktop and log in. After logging in Synergy continues to work properly. It's just when I lock my screen or wake up from hibernate/sleep, synergyc isn't working any more.

The forums and blogs I've read all suggest the above two lines should be everything needed to have synergyc running at all times, so I wouldn't need an extra keyboard just to log in.

Update -Solved:
When I'm logged in and look at the running processes I see synergyc running 6 times, 3x as root and 3x as MyUsername. When I lock my screen, 3 additional synergyc processes running as root appear. When I unlock again (using a 2nd keyboard, synergy is not responding at this time) the 3 additional processes close and synergy starts working again.

I've put this script in my lightdm.conf:

#!/bin/bash -x
/usr/bin/pkill -u root synergyc
while [ $(pgrep -u root -x synergys) ]; do sleep 0.1; done
/usr/bin/synergyc 192.168.xx.xxx

Now everything works and I can remove my 2nd keyboard+mouse. It's just that the mouse pointer jumps back to the primary screen of my synergy server when logging in/out or locking screen on the client...

  • Could it be that the connection just dies when you go into hibernate? What happen when you execute /usr/bin/synergyc in an interactive shell and the go to hibernate? – Raphael Ahrens Oct 20 '15 at 14:10
  • While trying this, I noticed the synergy client is running multiple times. To solve this I've been looking at scripts that prevent this, but they all seem to kill the relevant processes and then start it again instead of letting it run. This causes the mouse pointer to jump back to the server's screen. – bertenvdb Oct 23 '15 at 13:55
  • You should add your edit as an answer to make it easier for people to find you solution. – Raphael Ahrens Oct 26 '15 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.