Jump to content

Mac Server/Windows Client Re-connectivity Issues


J. Young

Recommended Posts

Hi, I am running Synergy Pro 1.8.8-stable on both my Mac (OSX 10.12.4) and Windows 10 machines using SSL. My Mac is configured as the server with a static IP address. I have my Windows machine to never power down (except for the monitor) since I need it for RDP access. My Mac is a laptop so I have it configured to sleep when I transport it or after periods of inactivity. When I wake the Mac up, my Windows client never reconnects to Synergy until I stop and restart Synergy on the Mac using the System Tray icon. Once I stop and start the service, the Windows client reconnects immediately. As far as I can tell, Synergy is running when the Mac wakes up, but it doesn't allow my Windows client to reconnect. My client polling interval is set to 15000 ms, but even if I wait for a few minutes, the client does not reconnect.

Is there a way to make this work more seamlessly so that Windows automatically reconnects without having to touch the service on my Mac? It's a minor annoyance, but one that comes up multiple times over the course of the day. Do I possibly have something misconfigured? Maybe creating a logon script to restart the service on my Mac would help?

Any assistance in helping make this work better is appreciated.

Link to comment
Share on other sites

Paul Suarez

You can add Synergy to login item, which still requires users to login first. To be able to use before login, you need to register synergys/c with systemd

Link to comment
Share on other sites

Thanks, I've added this as a login item. I'll test it over the course of the next few days and report back how this works.

Link to comment
Share on other sites

Paul Suarez
15 minutes ago, J. Young said:

Thanks, I've added this as a login item. I'll test it over the course of the next few days and report back how this works.

You're welcome @J. Young. Let us know how it works. :)

Link to comment
Share on other sites

So, setting this as a login item has not resolved my issue. Maybe this is because on relogin, it recognizes that Synergy is already running and doesn't restart the process?

I have learned that if I run 'kill $(pgrep -f synergy)' from the command line with Synergy running in my System Tray, it recognizes that the service is no longer running and automatically restarts Synergy. This causes my Windows client to immediately reconnect. So now I just have to figure out the best way to execute this piece of code on login. It looks like there are a number of ways to skin the cat - Automater, LoginDaemons, etc. 

So, knowing the above, I can probably get this going, but is this expected behavior? Am I really supposed to have to restart Synergy each time I wake my Mac up? The service is running since it was placed in a suspended state upon my Mac going into sleep mode. Based on other applications I use, the process should resume and recover itself without any user intervention.

Link to comment
Share on other sites

So the winning combination for my use case......

In Automator, create a new service with "No Input" for "Every Application".
Select "Run a Shell Script" and paste in "pkill -f synergy".
Assign a keyboard shortcut under System Preferences --> Keyboard --> Keyboard Shortcuts --> Services --> General --> [Your Service].

How to create the shortcut was taken from https://superuser.com/questions/969775/how-can-i-bind-a-shortcut-to-execute-a-shell-command-in-mac-os-x .

------------------------

This solution works best for me because I determined it was best to have a way to restart the service on demand and only when I needed it, as opposed to every time I log in. It would be nice to have this functionality built directly in to the Synergy service.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...