Torombolo

Boot Raspberry Pi 3

11 posts in this topic

Hello, after following 3 tutorials on how to try and make it to load on start up i have failed all of them.

(right now i have a mouse to the pi just to doubleclick synergy)

Can anyone help with making synergy auto start on the Raspberry pi 3 and start as a client.


Thank you!
 

Share this post


Link to post
Share on other sites

But have you been able to connect your Pi and your server? Also, have you set a static IP address for your server?

Share this post


Link to post
Share on other sites
Just now, Paul Suarez said:

But have you been able to connect your Pi and your server? Also, have you set a static IP address for your server?

yea the pi connects to the server with no problem and i can use the mouse and keyboard on both flawlessly 

Share this post


Link to post
Share on other sites

Are you rebooting it while it's connected? Also, have you created a new autostart file for LXDE? or have you just added the script to an existing autostart file?

Share this post


Link to post
Share on other sites
4 minutes ago, Paul Suarez said:

Are you rebooting it while it's connected? Also, have you created a new autostart file for LXDE? or have you just added the script to an existing autostart file?

created a new File, Rebooted while connected and not connected.

Share this post


Link to post
Share on other sites

I had to sort through old information to get method right and, as is usual in these cases, one small detail was holding me up. Here's what I did to get synergy 1.10 to start at boot on my Pi 3b+ running the latest Raspbian as of this date. Credit Nick Cullen for the script.

1) Make this script in /usr/bin and name it something descriptive like startsynergy. Or name it Bucephalus if you want. It worked for Alexander. It's usual to give scripts an extension like .sh, but not necessary. I didn't use an extension. Whatever you name it, use the full name in what follows.

=====================================
#!/bin/bash

killall synergyc    # Kill all previous synergy clients
sleep 1                 # Wait 1 second

/usr/bin/synergyc --name raspberrypi 192.168.1.5  # client name, server ip or name
exit 0   # Exit gracefully

# use full path to executable if synergy not installed by pkg manager. substitute your client name and server ip.
# sunergyc = client, synergys = server
=====================================

2) Make the startsynergy script executable with --> sudo chmod +x /usr/bin/startsynergy

3) Add the following line to ~/.config/lxsession/LXDE-pi/autostart
   @lxterminal --command startsynergy
   Put this before the line that starts with @xscreensaver or else it will not run the script.

Note: There are autostart files at /etc/xdg/lxsession/LXDE/autostart and at /etc/xdg/lxsession/LXDE-pi/autostart. Editing either of these will not run the script. You'll find people on line telling you to use one or the other of those but that is old information. Recent versions of Raspbian have per-user autostart files located in the home directory inside the hidden .config directory at the path in step 3. Use that one.

Your script is correct if you can run it with the command startsynergy. The line you added in autostart will then do the same thing at boot - open a terminal and run the command. The terminal closes at the end of the script. Synergy will connect and run without opening the GUI that puts the little circle icon in the taskbar. This is fine for me as, once I've configured synergy the first time with the GUI, I never look at it. If you like the GUI to run, that takes one of about six other methods I've read about but not tried.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks Skylar!  

 

This method works for me.

 

EDIT:  So this is weird.  When I open up a terminal, it boots my synergy session.  Any thoughts?

Share this post


Link to post
Share on other sites

Doesn't happen for me so I'd just be guessing. I'd make sure the autostart file you edited is the correct one ---> ~/.config/lxsession/LXDE-pi/autostart and not one of the at least 3 autostart files located elsewhere in Raspbian. Editing this one will run the script when you log on as user Pi, or whatever user - whichever home directory you find the autostart file in that you add the startsynergy line into. There are ways to intentionally run a script every time you open any terminal, though I never do that and I'd have to look it up. So this is my best guess. I know this method runs flawlessly for me.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now