Setup Synergy Client Autostart

Now you've compiled and installed Synergy for the Raspberry Pi, you probably want it to start right away whenever you start the LXDE.

You need to create an autostart file for LXDE, or add to it if it already exists, do the following through the terminal
Download: file
sudo mkdir -p ~/.config/lxsession/LXDE
sudo touch ~/.config/lxsession/LXDE/autostart
sudo nano ~/.config/lxsession/LXDE/autostart
This will open the autostart file, add the following line to the bottom of the file
Download: file
What this does is start the script named whenever LXDE starts

We need to write the script, again, open the file using nano
Download: file
sudo nano ~/
The script contents should be
Download: file

killall synergyc
sleep 1
synergyc --name pi
exit 0
Change the IP above to whatever your Synergy server's IP is!
Close nano, the hot-key for closing nano should be CTRL-X

It will ask you to save before closing, you must save it
Now we need to make sure the script has permission to execute, use the chmod command
Download: file
sudo chmod 777 ~/
and you are pretty much done, make sure the Synergy server is running, and reboot the Raspberry Pi. When LXDE starts again, the Raspberry Pi becomes a Synergy client and connect with the Synergy server automatically.
This guide was first published on Dec 11, 2013. It was last updated on Dec 11, 2013. This page (Setup Synergy Client Autostart) was last updated on May 04, 2015.