4

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:

synergys

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?

3 Answers 3

2

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

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

OR

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.

UPDATE

based on comment

defaults write com.apple.finder AppleShowAllFiles TRUE/FALSE

killall Finder (restarts finder after previous command is executed)

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

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.
Pros:
Synergy is persistent, so this allows for a multi-user setup and interactive logins.
Cons:
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.
Pros:
The synergy process inherits the $SECURITYSESSIONID environment variable, and therefore copy/paste works.
Cons:
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.
Pros:
Does not require root (Administrator) access
Cons:
Once the user logs out, synergy dies, and no remote control is possible.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .