Torombolo

Boot Raspberry Pi 3

16 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.

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

Not having any luck finding the directory ~/.config/lxsession/

The closest thing I have in .config is lxpanel and lxterminal, neither of which has an autostart file.

I am running the latest, fully updated Pi 3 b+

Synergy runs fine when I start it manually.

Anyone know where I am going wrong?

Share this post


Link to post
Share on other sites
Posted (edited)

Running the autostart.sh script that is supposed to launch synergyc (client) doesn't do anything for me. The script works fine when trying to run synergy but it doesn't properly input the server IP.

 

I'm running the latest version of Rasbian Stretch and Synergy 1.10.1

Edited by Johann Baron Lanteigne

Share this post


Link to post
Share on other sites

Just got a Pi 4 running Raspbian 10 (buster). This startsynergy script runs fine but the place to add the command (@lxterminal --command startsynergy) to run it at boot has changed in buster. It's now at ----> /etc/xdg/lxsession/LXDE-pi/autostart <----. As before, add that line before the line that starts @xscreensaver.

This autostart file has moved before and we should assume that it will move again I expect.

  • Like 1

Share this post


Link to post
Share on other sites

I also just got a Pi 4 and am running Raspbian 10 (Buster), running Synergy 1 Pro version 1.10.2-stable-8c010140 (build date May 9 2019).

I used the change that Sklar said about using /etc/xdg/lxsession/LXDE-pi/autostart and that worked for me, but it wasn't connecting or working correctly. It was trying, but not quite making it. Here are the changes I made to get it working:

In the script file, I used the following:
 

#!/bin/bash

killall synergyc
sleep 1
synergyc --enable-crypto xxx.xxx.xxx.xxx
exit 0 

where xxx.xxx.xxx.xxx is your IP address. The reason it was crapping out was because the server was expecting TLSv1.2 and when it wasn't specified, it would throw an error on the server:
 

ERROR: tls error occurred (system call failure)
ERROR: failed to accept secure socket
WARNING: client connection may not be secure

and synergyc wouldn't start or connect properly on the Raspberry Pi, so I added --enable-crypto and presto! It connected, the server was happy, no mouse lag on the client and all is well. I had already connected previously with the GUI version and got both the server and client set up, so I didn't need the --name command because it already knew who the client was.

Now, once I have synergyc running happily and silently in the background, how do I get the actual desktop app to load in the system tray instead of synergyc so I can visually see if it drops, click on it to bring it up, etc.? Like so:

Edit /etc/xdg/lxsession/LXDE-pi/autostart and replace the 

 @lxterminal --command startsynergy

with:

@synergy --client --debug INFO --name raspberrypi --enable-crypto xxx.xxx.xxx.xxx:24800

where xxx.xxx.xxx.xxx is your server's IP address. Also, if you've changed the port in the server, be sure to change 24800 to whatever you changed it to. This will no longer use the bash script you made earlier and will simply load the desktop app itself. Make sure synercyc isn't running at the same time or you'll run into problems. Also, this will start the app without it loading the terminal window and should auto-connect to your server.

Edited by dbatting
  • Like 1

Share this post


Link to post
Share on other sites
On 8/1/2019 at 10:00 PM, Sklar said:

Just got a Pi 4 running Raspbian 10 (buster). This startsynergy script runs fine but the place to add the command (@lxterminal --command startsynergy) to run it at boot has changed in buster. It's now at ----> /etc/xdg/lxsession/LXDE-pi/autostart <----. As before, add that line before the line that starts @xscreensaver.

This autostart file has moved before and we should assume that it will move again I expect.

This worked for me, however I am on Raspbian 9 Stretch.  Odd.

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