Jump to content

Hello! 👋

These forums are now archived (read only).

Join us on Discord.

Auto start on Linux before login


Recommended Posts

Hi,

 

just installed latest release synergy2. And I'm almost happy - get it working for my windows 10 and xubuntu 17.10 machines. But one thing still is not working as expected: On linux synergy does not autostart before login. So I still need a keyboard for login. Does anyone know how to put synergy into start at boot?

  • Like 1
Link to post
Share on other sites
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

  • marcelo

    6

  • Xerotope

    6

  • Nick Bolton

    5

  • bvstone

    4

Top Posters In This Topic

Popular Posts

Even though some features are not available yet, I've found that since the launch of Synergy 2 that the Symless team has continuously worked to improve on its reliability and efficacy. My personal phi

Hi,   just installed latest release synergy2. And I'm almost happy - get it working for my windows 10 and xubuntu 17.10 machines. But one thing still is not working as expected: On linux syn

Second this. Especially important when you're linux box is without its own keyboard and mouse.

  • Synergy Team
Nick Bolton

This is a planned feature, could be about 6 months away though. Can you work around the issue for now or is it a deal breaker?

Link to post
Share on other sites
  • 3 weeks later...

Me too.  I would like Linux synergy to run as part of the operating system beneath the user, so that it will continue to work when switching between users.  I had to stop synergy, switch user, and start synergy on the next user every time I changed users.

Thanks.

  • Like 1
Link to post
Share on other sites
  • Synergy Team
Nick Bolton
5 hours ago, ipokkel said:

Especially important when you're linux box is without its own keyboard and mouse.

Oh god. That's painful. Yep, we certainly need to fix that bug. I'm seeing it constantly on my Linux client :(

Link to post
Share on other sites
CatPasswd

Another vote. Maintaining headless linux boxes is the number one reason I bought synergy 1 when it went commercial. And being able to specify SOMEWHERE in the config that the machine it's running on is always a client needs to be part of this feature. 

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

Another me too.  I just purchased and I am going to refund.. I would have thought this would been already part of the pro feature.  If I need a keyboard and mouse to sign into my linux box, I'll just leave it there a nd not use synergy 2.

Link to post
Share on other sites
  • Synergy Team
Nick Bolton
4 hours ago, ipokkel said:

Even though some features are not available yet, I've found that since the launch of Synergy 2 that the Symless team has continuously worked to improve on its reliability and efficacy. My personal philosophy is that this is a small company trying to make, what I consider, a big difference and every bit of support towards them contributes to the development of those features that we're awaiting on.

Thanks for sticking with us! It’s amazing to hear our hard work is appreciated ?

  • Like 1
Link to post
Share on other sites
7 hours ago, ipokkel said:

Even though some features are not available yet, I've found that since the launch of Synergy 2 that the Symless team has continuously worked to improve on its reliability and efficacy. My personal philosophy is that this is a small company trying to make, what I consider, a big difference and every bit of support towards them contributes to the development of those features that we're awaiting on.

I run a small software company too.  I work weekends and holidays to get things done.  :) When the features are there, I'll for sure re-purchase, but right now it doesn't do what I need.  That's why trials are nice vs paying, finding out it doesn't have what you need, and asking for a refund.

Link to post
Share on other sites

I swear I remember doing this back in the early (read: free) Synergy 1 days. Granted, setting up anything fancy was a pretty interesting challenge back then.

Link to post
Share on other sites
  • Synergy Team
Nick Bolton
On 03/04/2018 at 1:43 PM, bvstone said:

When the features are there, I'll for sure re-purchase, but right now it doesn't do what I need. 

What features are you looking forward to?

Link to post
Share on other sites
  • Synergy Team
Nick Bolton
26 minutes ago, bvstone said:

see the original question.  :D

Ah, auto start before/at login screen on Linux?

Link to post
Share on other sites
EurekaMan

I don't know how effective this will be for you, but I can explain what I have done to work around this problem. I run LinuxMint dualboot on my laptop, but prefer to use my normal keyboard and mouse to work on it from my main computer. To get synergy working at login screen, after disabling the service, I added a line that reads

Environment="XAUTHORITY=/var/run/lightdm/root/:0"

 after the ExecStart line in my systemd synergy.service file. Reenabling the service and restarting I believe was enough to get it working at login. I also created a synergyRestart.service that runs after login without the XAUTH stuff. This also runs after hibernation/suspend because I noticed sometimes synergy would just stop working for whatever reason. This was several versions ago and I haven't tried editing any of it since then, except that you have to re-add the XAUTH environment lines with every update because the service file gets overwritten (I suppose you could maybe just make it read only, but I figure something important also may change with the update). The only real downsides I suffer from this is after login I have to wait for the main computer to refind the laptop and reconnect, but that likely is also impacted by the fact that I have to disable/reenable my ethernet device lest it sometimes not respond (unrelated to synergy). I'm not very knowledgeable about linux, and know almost nothing about systemd itself. This was just hacked together from forum posts to make it work in the first place, but it works well enough for me.

  • Thanks 1
Link to post
Share on other sites

@EurekaMan my setup environment are exactly the same (Winbox > dualboot laptop w. mint). I would love to get this working, tried this but still have no access to the laptop at login screen.

These are the files edited (synergy.service) and created (synergyRestart.service). The synergy.service has the added XAUTH as suggested and the synergyRestart.service not.

/lib/systemd/system/synergy.service
user//lib/systemd/system/synergyRestart.service

user//lib/systemd/system-sleep/synergyRestart.service

user//lib/systemd/system/synergy
user//lib/systemd/system/synergyRestart.service

Have I done it right / Have you done anything different?

Link to post
Share on other sites
EurekaMan

I apparently derped pretty hard when I originally did all this, I just realized my synergyRestart.service just restarts synergy.service so it keeps the XAUTH environment all the time. I should probably fix that some time. As for our differences, I'm just going to list my entire files and where they are located.

sudo systemctl disable synergy.service

edit /lib/systemd/system/synergy.service to read as

[Unit]
Description=Synergy Service
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=0
SyslogLevel=err
ExecStart=/usr/bin/synergy-service
Environment="XAUTHORITY=/var/run/lightdm/root/:0"

[Install]
WantedBy=multi-user.target

NOTE: There is also a /usr/lib/systemd/system/synergy.service file. These are not symlinks, and I don't know what it's for as systemctl uses the /lib/systemd/system/synergy.service file on my system.

sudo systemctl enable synergy.service

I made a file in /etc/systemd/system/synergyRestart.service that reads

[Unit]
Description=Restart synergy after suspend
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart synergy.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
WantedBy=multi-user.target
sudo systemctl enable synergyRestart.service

After this I probably restarted to see if it worked. I really can't think of any other changes I made related getting synergy at login.

Some thoughts:

You said you're on mint so you likely have the same XAUTH as I do, but I'd check to make sure by running

px aux | grep auth

This should give a line about xorg with a -auth argument.

If I ever go to update this setup, I'd probably move my synergyRestart.service file to one of the usr locations as you have done. I had never even heard of systemd when I went to get this whole thing working so it's a very ugly setup. I'd probably also make a whole new service file for synergyLoginScreen.service that is a oneshot at bootup with the XAUTH environment. Then, edit synergy.service to not use XAUTH, and to run at multi-user instead, possibly from a script file that also kills off the synergy.service with the XAUTH environment. Also remove multi-user from my restart file. It'd be a little cleaner that way, but I just don't have the time right now to figure out how that would all work.

One last caveat:

In writing this post, I discovered that I have no usecase for if someone logs out back to the login screen: one is just stuck without synergy at that point.. I never actually log out without restarting myself, so it never occurred to me. I'd think a small edit to synergyRestart.service would fix that but you'd have to find out what systemd uses at login screen to target it. Switch user worked fine though, and locked screen from screensaver/suspend also work with the restart file.

Let me know if anything else is unclear. I'm aware my writing is a jumbled mess.

Edited by EurekaMan
i derp
Link to post
Share on other sites
EurekaMan

I was mucking around a little, and unless you have issues with suspend or whatnot, that synergyRestart.service file may not even do anything for you. My creating it came from problems that stemmed from my buggy network card I believe. Synergy persists from login to desktop using that xauth environment without it needing to be restarted. That said, if you wanted to really be prudent, you'd probably want to figure out the whole "service with xauth only at login and then restart it without xauth at desktop thing." I believe adding the xauth line to your service file should be all that's necessary to make it work at login.

Link to post
Share on other sites
  • 1 month later...
rcortese

Being able to login through Synapse is SUPER important for me.

Since this is a far off future feature, I'd greatly appreciate an "official workaround". There seems to be umpteen tutorials on how to do it online, not sure which way to go.

Ubuntu 18.04 here btw.

Link to post
Share on other sites
  • 1 month later...
  • 2 months later...
  • 1 month later...

I too, would love to have an official and easy way to make this happen. (To start synergy automatically, before logging-in).

Still, I am happy of the current paid product and enjoy using it very much.

Thank you Nick and Synergy's team! :x

Ah I forgot - an official installation file for Arch - especially for Manjaro, would be great!
I started using Manjaro KDE and I LOVE it. However I couldn't use it with Synergy so I had to switch back to Linux Mint...

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...