horst12

Auto start on Linux before login

33 posts in this topic

I'm not sure if this is relevant to Synergy 2 - but the post I made here:

is what I use with Synergy 1 and my headless CentOS 7 machine, works fine for me at least.

Share this post


Link to post
Share on other sites

I've tried what you posted in the other thread.

Synergy is started as a client before login, however, it will not connect to the server until I actually login to the linux box

Share this post


Link to post
Share on other sites

I bought Synergy and Early Access... This is a feature that must be included!

Share this post


Link to post
Share on other sites

I really should have done my homework before buying this software.

I didnt see a demo or trial version, and since I know this software has been out for a while, I just "Assumed" that it would have some kind of autostart feature...

I have two machines, one Windows 10 and one Ubuntu 18.04, and I got this so I didnt have to keep unplugging my keyboard and mouse to plug it in to the other machine when needed.

Well... I still have to unplugg the keyboard and mouse to start Syngergy on the client Machine... kinda defeats the point of having a software KVM dont you think?

Please please can you add an autostart feature so that my 30 bucks dont go to waste... I could have just bought another keyboard for 30 bucks...

Share this post


Link to post
Share on other sites
43 minutes ago, Terror-Byter said:

I really should have done my homework before buying this software.

I didnt see a demo or trial version, and since I know this software has been out for a while, I just "Assumed" that it would have some kind of autostart feature...

I have two machines, one Windows 10 and one Ubuntu 18.04, and I got this so I didnt have to keep unplugging my keyboard and mouse to plug it in to the other machine when needed.

Well... I still have to unplugg the keyboard and mouse to start Syngergy on the client Machine... kinda defeats the point of having a software KVM dont you think?

Please please can you add an autostart feature so that my 30 bucks dont go to waste... I could have just bought another keyboard for 30 bucks...

Just ask for a refund.  I got mine pretty quick.  I can't believe this isn't still a thing.  Must not be possible.  

Share this post


Link to post
Share on other sites

In case this helps anyone, I finally bothered to get Synergy to auto-start before login for Kubuntu 18.04 (sddm login manager/KDE plasma shell).  I'm using systemd to start the process by creating a service file at /etc/systemd/system/synergy.service

[Unit]
Description=Synergy Service
Requires=display-manager.service
After=display-manager.service

[Service]
Type=simple
Restart=always
RestartSec=3
ExecStartPre=/bin/bash -c "sleep 10; /bin/systemctl set-environment SDDMXAUTH=$(/usr/bin/find /var/run/sddm/ -type f)"
ExecStart=/bin/bash -c "XAUTHORITY=${SDDMXAUTH} /opt/synergy-core/build/bin/synergyc -f -n minotaur 192.168.0.150"


[Install]
WantedBy=graphical.target

(replace "/opt/synergy-core" and "minotaur" with the path to your install of synergyc and your hostname respectively).

You then can enable the service at startup with "sudo systemctl daemon-reload; sudo systemctl enable synergy.service"

The ExecStartPre was necessary because the XAuthority file used by SDDM in randomly generated when the process starts.  The "sleep" is a bit of a hack to ensure the file was created after the display-manager.service starts.

Hope that's helpful for someone out there!

Dean

Share this post


Link to post
Share on other sites

@Xerotope

Thanks Dean,

How would I have to modify the ExecStartPre statement if I'm using gnome and LightDM as the display manager?

So far, I don't have that statement.

instead, I have 

User=myUser
Group=root

 

the problem I have so far is that it does not work upon reboot. 

For it to work, I have to login (via other means) to the GUI, and then restart the service

Thanks for your help,

Marcelo

Share this post


Link to post
Share on other sites

I don't have the time to boot my machine with LightDM as the display manager right now, but google suggests it might be /var/run/lightdm/root/0.  Maybe see what's there in your system?   (If it doesn't change every boot, you don't even need the ExecStartPre and just hard code the path into the value of XAuthority).

It would probably be cleaner to have a script that isn't dependent on a specific display manager.

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