How to run both a Synergy Client and a Synergy Server on the same machine

synergytunnel

To put it in one sentence I'd like to know how to run both a Synergy Client and a Synergy Server on the same machine, for further details please read on.

I'm trying to use my windows XP laptop in two multi-monitors-multi-computers environments one at work and one at home.

the idea is to unplug the laptop from the synergy environment it shares with Ubuntu at work and plug it to the environment it's sharing with my Macbook Pro at home with a minimum hassle.

I've successfully configured synergy separately for each of the setups:

  • In the XP/Ubuntu case the XP is the Synergy server (it has the keyboard and mouse attached to it)
  • in the XP/Macbook case the keyboard & mouse are attached to the OSX.

But in order to change from a server setup to a client setup I need to restart Synergy, I'm also encrypting the synergy traffic using stunnel but I don't think it makes things any more difficult because with stunnel I can route different ports to different services.

all In all I think I need either

1) the ability to run two synergy services in parallel: one in server mode and one in client mode, obviously each using a different configuration, how do I do that?

or

2) swap quickly between different synergy configurations.

Thanks!

Edit: evidently the question should have been how to run both a stunnel server and a stunnel client on the same machine.
Because as revealed below synergy has a command line interface and it's possible to run synergys and synergyc at the same time.
the bigger issue is with synergy running as a client on windows as it must run as a system service in order to allow to ctrl+alt+delete login.
unfortunate enough for me It's a hard requirement in my case as I want my Macbook to be the center piece of the system at home and hence want the input devices attached to it such that I can interface the system even when the XP laptop is not around.

with the other system (XP/Ubuntu) this is the other way around: the XP is the center piece and needs to be operated regardless if the Ubuntu is up, so it needs to run a server setup in this case.

My solution is to run a stunnel/synergy client setup as services (to address the login issue which incidentallyis not 100% solved but I'll raise another question later)
Since the stunnel service could be set up as either a client or a server (and pretty much the same goes for synergy anyway)
I've decided to write a batch file that will launch a stunnel server and a synergy server and index it with launchy for fast execution.

Thanks for all the help.

Best Answer

I don't have a Windows PC available at the minute to test this but Synergy on Linux at least, comes with "synergys" and "synergyc" being server and client respectively.

I'm assuming that the loader for Windows is a dynamic config creator which then loads one of the two files above (in .exe form) to do what you have asked (either checked server or client radio buttons) rather than there being a single .exe for both client and server.

If this is the case, you should have separate client and server files in your synergy install directory which you should be able to run independently and simultaneously using the command line.

Using --config to load separate config files, you should be able to achieve what you are asking. See http://synergy2.sourceforge.net/configuration.html for the options.

Related Question