Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know in what order services and applications are started in OS X (Mountain) Lion from startup folders like:

share|improve this question

migrated from Sep 6 '12 at 19:58

This question came from our site for professional and enthusiast programmers.

Belongs in Super User – Cole Johnson Sep 6 '12 at 14:49
3 would be a better choice. – Wooble Sep 6 '12 at 14:50

/System/Library/LaunchDaemons, /Library/LaunchDaemons, and /Library/StartupItems are all processed at system startup. There's no specific order to the LaunchDaemons folders -- everything in them becomes eligible to run all at once, only those with <key>RunAtLoad</key><true/> actually launch immediately. The launchd way of doing things is to fire 'em all off and let them sort out their own dependencies.

StartupItems (if there are any) define their own order. Each StartupItem is a folder that includes the script to run, and a StartupParameters.plist file that (among other things) can define what the StartupItem provides, and what it requires; they will be ordered so that the item that provides a particular capability run before those that require it.

I'd expect StartupItems to run after RunAtLoad LaunchDaemons, but I don't think that's specified anywhere and I wouldn't count on it.

The items in the three LaunchAgent folders are all loaded when a user logs in (i.e. sometime after system startup). As with LaunchDaemons, there's no particular order, they all become eligible to run at the same time.

Finally, there is no /System/Library/StartupItems folder in OS X Lion.

share|improve this answer

You must log in to answer this question.