0

I've tried multiple ways to get it to work,

https://learn.adafruit.com/synergy-on-raspberry-pi/setup-synergy-client-autostart

https://www.rootusers.com/compiling-synergy-from-source-on-the-raspberry-pi/

And that method adding the command to rc.local.

Nothing works unless I call them manually...

Am I doing something wrong?

6
  • 1
    I believe that synergy uses x windows and hence can't be invoked using rc.local as by the time rc.local executes, x-windows is not up. You can try adding it to /etc/xdg/lxsession/LXDE-pi/autostart instead of what is shown in that link. Hope it helps. – dhruvvyas90 Nov 1 '15 at 15:46
  • Isn't that effecitevely the asme as the first link? – Nos Nov 1 '15 at 15:50
  • 1
    Since you're able to run it manually, there is nothing wrong in compilation or otherwise. I think program is not being called from start up script properly, most probably because newer version of Raspbian calls autostart from LXDE-pi instead of normal LXDE startup, not sure why this change in newer versions, may be someone experienced or someone having deeper knowledge of Raspbian can shed some light on this. – dhruvvyas90 Nov 1 '15 at 15:56
  • @dastaan I think you're right if you want to add that as an answer quick. – goldilocks Nov 1 '15 at 16:06
  • @goldilocks Added. :) – dhruvvyas90 Nov 1 '15 at 16:12
1

Since synergy uses x-windows and hence can't be invoked using rc.local as by the time rc.local executes, x-windows is not up and running. You can try adding it to /etc/xdg/lxsession/LXDE-pi/autostart as per below steps:

  1. sudo nano /etc/xdg/lxsesssion/LXDE-pi/autostart
  2. Add : @/path/to/your/script.sh at the end.
  3. Ctrl + x --> y to save changes.
  4. sudo reboot to see if it works.

As per links in question, I think the method described in it is not working because newer versions of Raspbian calls autostart from LXDE-pi instead of normal LXDE startup, not sure why this change in newer versions, may be someone experienced or someone having deeper knowledge of Raspbian can shed some light on this.

Hope it helps.

11
  • I can't get it to work. i.imgur.com/ScBnoCs.png – Nos Nov 1 '15 at 16:42
  • @Nos Try @/full/path/to/synergyc --name pi 192.168.123.181. Make sure file rights are as per required. – dhruvvyas90 Nov 1 '15 at 16:51
  • Like this? i.imgur.com/Epk80d7.png – Nos Nov 1 '15 at 17:09
  • @Nos Use absolute path like this : @/home/pi/Downloads/Synergy/bin/synergyc --name pi 192.168.123.181 This should ideally work. – dhruvvyas90 Nov 1 '15 at 17:14
  • 1
    Success, with the efforts of your and JimmyN's I finally got it working as described in the answer. Thanks dastaan. – Nos Nov 5 '15 at 16:50
1
sudo nano ~/.config/lxsession/LXDE-pi/autostart

Add path to the synergy startup script like this.

@sh /home/pi/synergy

With synergy containing ( for me )

#!/bin/shell
killall synergyc
/home/pi/Downloads/synergy-1.4.18-Source/bin/synergyc --name Pi 192.168.123.181

Confirmed working on Jessie.

Edit as needed.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.