4

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.

2
  • 1
    Have you tried it and run into roadblocks? Theoretically you can run both at the same time from the command line without any problems.
    – digitxp
    Nov 21, 2010 at 17:31
  • Actually no - I did not try because I did not know where to start for some reason I did not realize that there are commandline switches to the synergy processes in windows. silly me
    – Mcradle
    Nov 21, 2010 at 23:00

2 Answers 2

3

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.

3
  • Thanks that's a good suggestion. however the problem is that I must run the client side as a service if I'm just running synergyc from the commandline I get the following error trying to unlock windows in the synergy log:"DEBUG: can't open Winlogon desk: 5" which research shows is a result of permission error. Running as a service however I'm unable to dismiss the windows screen saver to get to the logon screen.
    – Mcradle
    Nov 21, 2010 at 22:51
  • I've had a quick look at that error; is it happening on "ctrl-alt-del"? If so, you need to make sure autostart is set to "when the computer starts" for this to work correctly.
    – WoodE
    Nov 22, 2010 at 12:40
  • Yes, this is correct we're saying the same thing when set to 'when computer starts' means it runs as a system service. this is very nice I can come in and issue ctrl+command+delete (I use OSX as a serve mind you) and unlock the XP, however now I hit a different problem where if a screen saver kicks in I'm unable to dismiss it regardless of what I do, but this seems like yet-another-problem.
    – Mcradle
    Nov 28, 2010 at 15:12
1

synergys (the server) has a --config commandline switch that lets you select the config it's going to use, and you can pass the server's address to synergyc (the client).

So you can go for option 2) by creating two batchfiles, both of them should first stop the running instance (use TASKKILL command, or pskill), then start a new one with one of the configurations. Btw there's no reason why you cannot have the laptop act as server in both configurations, or is there?

1
  • I was thinking about making the laptop a client in both cases but that wouldn't change the problem because I would still need a way to connect to two different IP addresses, the reason I do not want the XP as a server at home is that I would like to be able to use the Macbook even if the XP laptop is not hooked up, i.e. I would like the only set of keyboard and mouse connected to the Macbook.
    – Mcradle
    Nov 21, 2010 at 22:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .