How to Auto-Start Synergy Correctly on MacOS 10.5 (Leopard)
Wednesday, January 7th, 2009Synergy is a wonderful tool: it lets you run multiple computers on your desktop, but use a single keyboard/mouse. The mouse cursor moves between screens seamlessly. Configured correctly, you even have a unified clipboard to enable copy/paste between machines, even running different operating systems. I have two Linux desktops and a Mac laptop on my desk and Synergy is a life-saver.
Configuring synergy and getting it to auto-launch correctly is not especially simple: the synergy autostart manual lists three ways, none of which worked for me to get the clipboard working. But I found, hidden in the Synergy bug database, a configuration script which solves the problem perfectly on MacOS 10.5 (Leopard):
- In a terminal, become root: sudo su -
- emacs /Library/LaunchAgents/org.gnu.Synergy.plist
- I have synergy at /builds/synergy-1.3.1. My mac client is named dupre. My Linux server is named gabrieli. Adjust these values accordingly:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.gnu.Synergy</string> <key>ProgramArguments</key> <array> <string>/builds/synergy-1.3.1/synergyc</string> <string>-n</string> <string>dupre</string> <string>-1</string> <string>-f</string> <string>gabrieli</string> </array> <key>KeepAlive</key> <true /> <key>LimitLoadToSessionType</key> <array> <string>LoginWindow</string> <string>Aqua</string> </array> </dict> </plist>
Log out and log back in to get everything started. This will launch a synergy client for the initial login desktop. At login this client will be killed, and a new client will be started for the user’s desktop. Note: LaunchAgents are new in MacOS 10.5. This technique won’t work in earlier versions.