colwellkr

Start Synergy 2 on startup (GDM + KDE)

5 posts in this topic

Under Synergy 1 I was able to start synergy's client automatically at started by editing /etc/gdm/Init/Default as suggested here (https://help.ubuntu.com/community/SynergyHowto#On_the_Client-1). However, as synergyc no longer exists in Synergy 2 and Synergy 2 seems very dependent on its gui at startup, I am at a loss as to how get it to start automatically with my system. 

Once logged in I was able to autostart Synergy 1 using the same synergyc command that was used for GDM.

Any suggestions as to how I get back to launching synergy on boot/login?

Couple of side questions:
Does synergy 2 have SSL enabled? I can't find any information in the logs and there seem to be no configuration options anymore.
Any idea why my synergy jitters a lot when transitioning from Windows (server) to Linux (client)?

Thank you very much!

Share this post


Link to post
Share on other sites

I will be interested to see answers from other forum people. 

Just with the most recent version, 2.01-stable, I noticed Synergy 2 autostarts on all 3 of my machines. 

Win10 - Kubuntu 17.04 and Win 7 (32 bit)

What experiences are the rest of the forum having?

Share this post


Link to post
Share on other sites
58 minutes ago, KringleKrebs said:

Just with the most recent version, 2.01-stable, I noticed Synergy 2 autostarts on all 3 of my machines. 

Thanks for the response, I hadn't actually tried rebooting since I upgraded to 2.0.1-stable, but I just confirmed that it is not auto starting on my Centos 7 box and it isn't listed in the startup items on my Windows 10 box either. There could be some other things interfering with normal startup processes though as both machines are joined to my work's AD domain.

Share this post


Link to post
Share on other sites

If you are using systemd, the core process should already be enabled.

Have not tested this, but try changing out your edits from synergyc to synergy-config (which is a poor name for the gui, but alas)

Share this post


Link to post
Share on other sites

Same issue here. I use lightdm, but things should be close enough among kdm/gdm/etc.

I had a quick look, what I've found so far is with Synergy 2, synergy-service is runautomatically and it runs synergy-core, which is good. However, at lightdm/gdm, synergy-core can't connect to Xorg due to permission issue.

From Synergy2 log file I can see things like:

[2017-11-25T12:15:01] NOTE: stopped client
[2017-11-25T12:15:05] DEBUG: XOpenDisplay(":0")
[2017-11-25T12:15:05] WARNING: secondary screen unavailable: unable to open screen
[2017-11-25T12:15:05] DEBUG: retry in 60 seconds
[2017-11-25T12:15:05] DEBUG: event queue is ready
[2017-11-25T12:15:09] NOTE: stopped client

Xorg is run by lightdm as:

/usr/lib/xorg/Xorg -ac :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Note the -auth option. So what I end up doing is settings XAUTHORITY=/var/run/lightdm/root/:0 to the synergy service, which will then get passed along when it runs synergy-core:

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

I added in both /usr/lib/systemd/system/synergy.service and /lib/systemd/system/synergy.service, as I'm actually not sure which one is used.

That auth file is only readable by root, and when synergy-service runs synergy-core it runs with --run-as-uid (which is a good practice, but I have to break this unfortunately). So I also changed /var/lib/synergy/synergy-user.cfg and changed uid="1000" to uid="". Remember to stop synergy service before changing this file ("service synergy stop"). After this, synergy-core will be run as root.

This is definitely a workaround. Not sure what's the proper fix for this. Maybe @Nick Bolton can comment on this?

 

  • 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