10.5: Make Synergy keyboard sharing work in 10.5

Dec 18, '07 07:30:06AM

Contributed by: WegDamit

There is this fine little program named Synergy, which I use to share one keyboard with my Mac and my Linux box. In 10.5, my Synergy LoginHook (as described here) stopped working. However, I received a crash report stating "single thread forked" (or something similar), and if the program was started in the foreground (option -f), it still worked.

So i changend my LoginHook a bit and added -f > /tmp/synergy.log 2>&1 & as the last line to start the daemon in the foreground and redirect the output somewhere else. It's a hack, but it works. Here's my final script:

#!/bin/sh 
# prog=(/usr/local/bin/synergyc -n $(hostname -s) ip-address-of-server)   
prog=(/03_Tools/synergy-1.3.1/synergys -d WARNING -c /03_Tools/synergy-1.3.1/synergy.conf)
### Stop any currently running Synergy client 
killall ${prog[0]##*/}   
sleep 2
### Start the new client 
exec "${prog[@]}" -f > /tmp/synergy.log 2>&1 &
[robg adds: I haven't tested this one, and normally I'd assume the app would be updated to fix the issue in 10.5 and not run this as a hint. In this case, though, Synergy was last updated in April of 2006, so there may not be further updates forthcoming.]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20071206002748959