applications, you have two choices: start them when a user logs in,
or start them when the system boots up. On most Unix systems, startup
applications either reside in the
script or the
directory. Under Mac OS 9, you could
add a startup item by putting its alias in
Items. Mac OS X has a different approach,
described in the following sections.
To start an
application each time you log in, use the Accounts panel of System
Preferences and select the Startup Items tab. This is good for user
applications, such as
Stickies or an
instant messenger program. For
system daemons, you should set up a directory in
/Library/StartupItems, as described in the next
If you compile and install a daemon, you’ll probably want it to start at boot time. For example, MySQL will build out of the box on Mac OS X (you can download it from http://www.mysql.com).
A startup item is controlled by three things: a folder (such as /Library/StartupItems/MyItem), a shell script with the same name as the directory (such as MyItem), and a property list named StartupParameters.plist . The shell script and the property list must appear at the top level of the startup item’s folder. You can also create a Resources directory to hold localized resources, but this is not mandatory.
To set up the MySQL startup item, create the directory /Library/StartupItems/MySQL. Then, create two files in that ...