I recently setup my PC in the living room with my TV so I could play games and watch streamed video from the net (eg, BBC's iPlayer). Unfortunately this always meant having a keyboard and mouse attached.
Then came along Synergy.
Synergy is like a software KVM switch... First you configure the server and teach it where the screens "are" (this will make sense in a minute). You start then server on the machine which has control of the keyboard and mouse - in this case my laptop - and the client(s) - in this case just my PC although you can configure more. The server keeps and eye on where the controlling mouse is on the screens. If you move it off one of the configured edges then you take control of the machine thats configured for that edge. For example, Screen B could be to the right of Screen A (and therefore Screen A is to the left of B - but not necessarily!).
In my case all I have to do on my Mac Book Pro is to nudge the pointer off the top of the screen and I then take control of the PC plugged into my TV!
Unfortunately, it appears that Synergy (V1.3.1 at least) doesn't like running in Deamon Mode on OSX 10.5. Deamon Mode allows the server to run quietly in the background without requiring you to have a terminal window open all the time. For some reason it just crashes.
This morning I had a brainwave - the Screen command in UNIX operating systems allows you to start a process and detach it from the terminal! I generally only use this for applications I want to run on a remote machine from which I might get disconnected half way through (eg, if I want to run a long download which I can periodically check back on but dont want to break if my internet connection drops). Normally in UNIX, a process gets tied to the terminal it is run from so if the terminal dies (or the SSH connection to a remote machine), usually the child processes die with it. Screen stops this!
I simply created a startup script like this
#!/bin/sh screen -d -m /Applications/synergy-1.3.1/synergys --config /Applications/synergy-1.3.1/synergy.conf -f exit
The -d -m options tell screen to start in a forked and detached mode!
You can then use the Accounts section in System Preferences to tell it to run the startup script upon login! Easy!
4 Comments
SynergyKM runs great on Leopard, no fussing required
Hi Nick - I found this blog entry as I was struggling with the current Synergy 1.3.1 available at synergy2.sourceforge.net, which you wrote about above.
Well, that thing is a beast, and I never could get it configured (even using your trick with 'screen'), so I looked around a bit more and found SynergyKM, which is an OS X-friendly version presented in a PrefPane and a Menu Extra, based on Synergy 1.3.0. Very slick.
I had to fight with it a bit, but finally realized the name of the Mac had to be the 'Computer Name' and not the 'Local Hostname' (as the synergy2 version had demanded). Once I got all this set up, I was able to enable the client on my XP box, and all was well. Thought you'd like to know. I'm running 10.5.4. Cheers - Mike
I had the same problem when
I had the same problem when attempting to run it in daemon mode. I solved it in the following way:
( synergyc -f [Server_IP] & disown -a ) &> /dev/nullThe Synergy client is forced into the background by the shell then immediately disconnected from the terminal, essentially making it a daemon. This can be run at startup or in any terminal without worrying about it terminating with the terminal.
THANKS!
Wow, that really helped me out a lot. Thanks a million! You're the man now, dog!
late but...
I know I am like 1 year late, but you could have just used nohup instead of screen :)
I was struggling with this, but you gave me a good inspiration :)
Post new comment