I'm new to this so forgive me for asking such a simple question.

I'm trying to run something from the command line everytime I start (or log in to) Snow Leopard. I'm actually trying to imitate this Synergy+ startup script for Leopard. Problem is the code on that page for Leopard didn't work for me under Snow Leopard. I can get it to work by opening terminal and typing:


That starts Synergy+ as a server. So it's as simple as that. Now how do I run this command every time I start my computer?


Apple menu->System Preferences...->Accounts->Your Account->Login Items

Click '+' icon at the bottom to add "synergys".


Use terminal and edit or create the /etc/rc file (which is what the GUI based instructions above do.)

You should be able to just place the path to synergys and it, save, and should execute on next startup.


based on comment

defaults write com.apple.finder AppleShowAllFiles TRUE/FALSE

killall Finder (restarts finder after previous command is executed)

  • synergys is located in /usr/bin so I can't navigate to it from the finder. – Andrew Nov 8 '09 at 4:49
  • Command Shift G is much easier to navigate to /usr/bin/ – ridogi Jan 22 '10 at 17:42

From Synergy Documentation: Autostart

Mac OS X

[By Tor Slettnes]

There are three different ways to automatically start Synergy (client or server) on Mac OS X:

The first method involves creating a StartupItem at the system level, which is executed when the machine starts up or shuts down. This script will run in the background, and relaunch synergy as needed.
Synergy is persistent, so this allows for a multi-user setup and interactive logins.
The synergy process does not have access to the clipboard of the logged-in user.

The second method will launch Synergy from the LoginWindow application, once a particular user has logged in.
The synergy process inherits the $SECURITYSESSIONID environment variable, and therefore copy/paste works.
Once the user logs out, synergy dies, and no remote control is possible.

The third method is to launch a startup script from the "Startup Items" tab under System Preferences -> Accounts.
Does not require root (Administrator) access
Once the user logs out, synergy dies, and no remote control is possible.


Use the Login Hook :

Use the first method of the Apple Support Page.

sudo defaults write com.apple.loginwindow LoginHook /path/to/script

Do not forget the sudo otherwise it won't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.