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
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
~/.startsynergy.sh
What this does is start the script named .startsynergy.sh whenever LXDE starts

We need to write the .startsynergy.sh script, again, open the file using nano
sudo nano ~/.startsynergy.sh
The script contents should be
#!/bin/bash

killall synergyc
sleep 1
synergyc --name pi 192.168.0.16
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
sudo chmod 777 ~/.startsynergy.sh
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 Dec 09, 2013.

Text editor powered by tinymce.