Jump to content
Get SynergyOpen a support ticket

Boot Raspberry Pi 3


Recommended Posts

Torombolo

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!
 

Link to post
Share on other sites
Paul Suarez

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

Link to post
Share on other sites
Torombolo
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 

Link to post
Share on other sites
Paul Suarez

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?

Link to post
Share on other sites
Torombolo
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.

Link to post
Share on other sites
  • 1 year later...
  • 4 weeks later...
PezUnion2004

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?

Link to post
Share on other sites
  • 5 months later...

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?

Link to post
Share on other sites
  • 2 months later...
Johann Baron Lanteigne

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
Link to post
Share on other sites
  • 3 months later...
  • 1 month later...
  • 1 month later...
mikekarcic
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.

Link to post
Share on other sites
  • 6 months later...
Wilber54

Hi Guys with a mixture of both your suggestions mainly using dbatting method However when I reboot I get the GUI with the empty hostname and the alert telling me that the Hostname is empty. How do I resolve this guys? Thanks

Link to post
Share on other sites

If I understand what you're describing correctly, I most recently installed Synergy to a laptop running Lubuntu 20.04. I observed this same behavior until I saved the Synergy configuration. After I saved it to the Home directory, naming it default but you could name it anything I bet and, probably, save it anywhere, Synergy knew where the server is on every reboot. Have you saved the configuration?

Link to post
Share on other sites
Wilber54

Hi Sklar, Yes I have saved the Synergy config file, and have cleared the cache and re-installed Synergy several times and implemented all the methods and instructions submitted by yourself and others and still to no avail. Everything works fine with my PC to PC  windows 10 (The main computer) the other win7. The only problem I have is with the Pi with the latest Raspbian operating system on it. My Pi is a model 3 B+ It's driving me insane because it still means I have to clutter my desk with 2 keyboards and Mice.

Link to post
Share on other sites

Unfortunately, auto-run on Linux, in general, is not fully supported, we are looking to add better support in a future release.

For the time being, there is no workaround to this, sorry for the trouble.

Link to post
Share on other sites
Wilber54

Hi Alexey, Thank you for your honesty. It is disappointing to hear as it was one of the main reasons why I purchased the software in the first place was for my Raspberry pi. It is useful thankfully because I am using 2 PC’s also, otherwise I would have asked for a refund. Please can you or Symless keep me informed as soon as a work around to this problem is found.

Link to post
Share on other sites
  • 2 weeks later...
On 7/20/2018 at 5:19 PM, Sklar said:

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 Sklar. This solution worked with only a minor correction, which actually have cost me almost a whole day, but at the end I've got a victory.

With a Raspberry Pi 3 with almost a fresh install, it doesn't come with an "autostart" file at ~/.config/lxsession/LXDE-pi/ . So since most other solutions suggest you to create an autostart file from scratch with just your command, it halts your boot process.

What actually worked for me was to COPY the "autostart" file from /etc/xdg/lxsession/LXDE-pi/ to ~/.config/lxsession/LXDE-pi/ then edit the content of the file as Sklar described.

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@lxterminal --command startsynergy
@xscreensaver -no-splash

If you don't have anything else going on on your Pi like me, this is what your autostart file should lool like.

Edited by chotaa
Link to post
Share on other sites
  • 1 month later...

 

Quoting dbatting above:

=========================

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.

==========================

I'm now running another new pi board (the 8 gig pi 4) with with Raspbian 10 (or Raspios or whatever they now call it) (buster). This is the best solution I've found. I've ditched the script.

The only thing I'd add is that, until you set the server IP and  save the configuration for the first time, it won't find the server at startup. 

There's bound to be a switch in the command line to start it minimized. I have to look that up. This is strictly a grace note, though.

Link to post
Share on other sites
  • 1 month later...
Pi of things

As of August 2020, I couldn't figure out how to start the GUI with correct server address (Using Synergy as client)... but, I did manage to get the service started silently and I can live with that. I think Synergy has a bug where it saves it's first config file in /tmp folder and thereafter it doesn't pick up the config file even if you save it multiple times. Or it doesn't pick up the config file for client starts at all. Anyway solution on Raspberry Pi 4 (4Gb running latest Raspberry Pi OS May 2020 with updates).

Edit /etc/xdg/lxsession/LXDE-pi/autostart. Note the -pi in the folder name, because there is another one called LDXE which has an autostart as well and as far as I know that one doesn't work.

Add the following at the second last line of the file.

@synergyc xxx.xxx.xxx.xxx

So your file will look something like


@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@synergyc 192.168.1.37
@xscreensaver -no-splash

The address of course is your server's IP address. Reboot after this.

Your synergy client should have started now. To test try

pgrep synergy

It should give you a number which is the process ID. Now you can disconnect keyboard and mouse and go back to the server.

No additional scripts required.

Edited by Pi of things
minor edit
  • Like 1
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
×
×
  • Create New...