How to Auto-Start Synergy Correctly on MacOS 10.5 (Leopard)

Synergy 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):

  1. In a terminal, become root: sudo su -
  2. emacs /Library/LaunchAgents/org.gnu.Synergy.plist
  3. 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.

Atom Feed for Comments 3 Responses to “How to Auto-Start Synergy Correctly on MacOS 10.5 (Leopard)”

  1. Robert Accettura Says:

    Agreed Synergy is pretty cool.

    I gave up on it since I only want it if I can do it over an SSH tunnel… and setting that up to be automatic proved to be to much of a PITA. I hate the idea of every keystroke going over a network unencrypted.

  2. Justin Dolske Says:

    FWIW, I use SynergyKM on my MacBook (as a server, it’s my primary machine), which provides a a GUI to control it. I think it’s the one from http://www.macupdate.com/info.php/id/22270, but there are are apparently slightly different projects floating around named the same way. In addition to that confusion, the process of setting up screens is also weird. Seems to involve a lot of fiddling and tinkering until it decides to accept a config.

    I don’t have it fully automated (although it does launch when I log in), because I tunnel traffic over SSH. For example, to connect with my Mozilla desktop, I run (on my MBP):

    ssh -4 -o ForwardX11=no -R 24800:localhost:24800 dolske-desktop.office.mozilla.org synergyc -1 -n dolske-desktop -f localhost

    Synergy’s great, but it also seems to be unmaintained. It would sure be nice if there was a little more work done to make it easier to set up and use.

  3. Rob Campbell Says:

    seconding dolske on SynergyKM. I’m using it too on my mac which is my server, connecting a pc as a client.

    I found: http://sourceforge.net/projects/synergykm which apparently has a newer version of the synergy server and client software than I have!

Leave a Reply