MarcoPolo with SynergyKM

28 views
Skip to first unread message

spacex

unread,
Aug 26, 2010, 12:44:03 AM8/26/10
to MarcoPolo Discussion
Hey, just started using MarcoPolo, and am loving it. Hooray for not
having to switch settings when I get to work.

I am interested to see how many of you use Synergy (in general) and
SynergyKM in particular for managing synergy connections. With normal
synergy, I could just use a shell script to kill the synergy server
(or client) and start up the new one with the appropriate config
file. However, SynergyKM does not use config files on disk, so I am
working on making SynergyKM respond to a notification to switch
configuration sets (which it coincidentally enough calls
locations :-) ), so that I can create a new action for MarcoPolo that
will signal it to change locations.

Will anybody be interested in such a feature, or would a more general
MarcoPolo action that sends generic notifications be better?

Sang

unread,
Aug 27, 2010, 12:51:07 AM8/27/10
to MarcoPolo Discussion
I would love this feature. I have two location setup in my synergykm
for work and home and I hate having to manually change the location
every time. if it can be automated through marcopolo, it would be
awesome.

spacex

unread,
Aug 30, 2010, 11:35:22 PM8/30/10
to MarcoPolo Discussion
Well, turns out the MarcoPolo piece was way easier to implement than
the SynergyKM piece.

What version of SynergyKM are you using? I have noticed a huge
difference between the 1.0b6 and 1.0b7 versions, especially when it
comes to supporting Snow Leopard. I can only seem to find the source
for 1.0b6 (on the SourceForge page), not for 1.0b7. Do you (or anyone
else :-) ) have any idea where I can find the 1.0b7 source?

sceptiQ

unread,
Sep 13, 2010, 10:00:42 AM9/13/10
to MarcoPolo Discussion
im running SynergyKM too and MP support for SynergyKM would be
great ;)

RayR

unread,
Oct 5, 2010, 3:32:07 PM10/5/10
to MarcoPolo Discussion
Before 1.0b7 came out, I started writing an alternative Snow Leopard
compatible NSStatusItem project to control synergyd (the daemon that
SynergyKM uses to control synergyc and synergys). I had dug through
the code to find that they used notifications to communicate to
synergyd and that any app can post these notifications... I don't know
if it helps but I had posted this code at
http://sourceforge.net/tracker/?func=detail&aid=2853007&group_id=176447&atid=877287

As long as the notification messages didn't change between versions,
this type of communication might allow MP to "control" synergykm
regardless of version running...

Michael Williams

unread,
Oct 5, 2010, 6:00:54 PM10/5/10
to marcopol...@googlegroups.com
Exactly, I have been using the distributed notifications to change
locations and stop the client/server, but I am having trouble with
getting it to re-start the stopped process.  I have been using a
modification of the 1.0b6 source, but would really like to be using
the 1.0b7 source, as it has much better support for Snow Leopard,
along with some other updates.  I was hoping that this was something
that could be incorporated into future versions of SynergyKM, but it
seems that the project author(s) aren't responding on the project anymore.

I will work here shortly to clean up the changes I made to the 1.0b6
codebase, and get a patch posted somewhere, but I had to make quite a
few changes to the XCode project in order to even build it properly on
Snow Leopard.

Was the MenuItem app you made just based off of the 1.0b6 source as well?

spacex

unread,
Oct 6, 2010, 12:46:08 AM10/6/10
to MarcoPolo Discussion
Alright, so here is the patch for the MarcoPolo end of the support.
It is a very simple patch and should apply cleanly to both the
"official" 2.5.0 source (1) and the 2.5.1 source that includes the
Snow Leopard Wifi fix (2). All this patch does is add another action
to Marcopolo that signals SynergyKM to change locations. The
paramater of the action should be the same as the name of the
SynergyKM location configuration.

Eventually, I hope to have a blank parameter actual stop the synergy
service and then restart it upon subsequently issued signals.
However, that functionality doesn't seem to work properly with the
SynergyKM changes I've made.

This patch adds the necessary files to the directory structure, but in
order to build it, you need to go into XCode and right-click Classes-
>Actions, and select Add->Existing Files, and browse to <marcopolo
src>/src/ and add SynergyKMAction.h and SynergyKMAction.m to the
project. I don't know how these project changes translate into diffs,
and I think they are even binary changes, so without making (another)
fork of the MarcoPolo source tree, I'm just explaining :-)

In any case, here is the patch, and hopefully I can get my hands on
the SynergyKM 1.0b7 source soon so that I can rebase my changes
against the most current version. If anyone knows where to get the
1.0b7 source for SynergyKM, please let me know. Thanks!

1: http://git.symonds.id.au/marcopolo.git
2: http://github.com/radesix/marcopolo.git

Michael Williams

unread,
Oct 6, 2010, 1:02:54 AM10/6/10
to marcopol...@googlegroups.com
Oops, I forgot to attach the patch. Enjoy!
marcopolo-synergykm.patch.zip

RayR

unread,
Oct 12, 2010, 12:00:29 AM10/12/10
to MarcoPolo Discussion
Yeah, I built it prior to 1.0b7's release as the synergyd daemon from
1.0b6 worked fine with snow leopard, but the menu display was broken
as it uses unsanity ape. The menu item app I had built was a
completely independent application/project. I didn't even try to build
synergykm... All it did was post a notification to tell synergyd to
exit (stop working) and launch the synergyd daemon to "tell" it to
start working so on/off was all I had. Sounds like you're already much
ahead of that....

Have you checked into synergy+? I believe they have a newer common gui
meant to deprecate synergykm. I don't use it though as I've had far
more problems with it than solutions so far... However, building to it
may be building for the future if/when the project gets more stable
and feature rich...

On Oct 5, 4:00 pm, Michael Williams <williams.2...@gmail.com> wrote:
>  Exactly, I have been using the distributed notifications to change
> locations and stop the client/server, but I am having trouble with
> getting it to re-start the stopped process.  I have been using a
> modification of the 1.0b6 source, but would really like to be using
> the 1.0b7 source, as it has much better support for Snow Leopard,
> along with some other updates.  I was hoping that this was something
> that could be incorporated into future versions of SynergyKM, but it
> seems that the project author(s) aren't responding on the project anymore.
>
> I will work here shortly to clean up the changes I made to the 1.0b6
> codebase, and get a patch posted somewhere, but I had to make quite a
> few changes to the XCode project in order to even build it properly on
> Snow Leopard.
>
> Was the MenuItem app you made just based off of the 1.0b6 source as well?
>
> On 10/5/10 2:32 PM, RayR wrote:
>
>
>
> > Before 1.0b7 came out, I started writing an alternative Snow Leopard
> > compatible NSStatusItem project to control synergyd (the daemon that
> > SynergyKM uses to control synergyc and synergys). I had dug through
> > the code to find that they used notifications to communicate to
> > synergyd and that any app can post these notifications... I don't know
> > if it helps but I had posted this code at
> >http://sourceforge.net/tracker/?func=detail&aid=2853007&group_id=1764...

Benjamin Cox

unread,
Nov 11, 2010, 3:32:49 AM11/11/10
to MarcoPolo Discussion
I turn Synergy on and off from MarcoPolo in my own, somewhat hackish
way:

bash shell script -> AppleScript -> Synergy's System Preferences
pane

I simply look for the "Turn Synergy Off" or "Turn Synergy On" button
and click it. I think it'd be pretty simply to manipulate the
Location drop-down as well. I don't see a link to attach to this post
or I'd post the files. However, if you're interested, feel free to
get in touch.
Reply all
Reply to author
Forward
0 new messages