1) GUI applications launched by putting them in /Library/Preferences/loginwindow.plist -> AutoLaunchedApplicationDictionary
2) A single Non-GUI executable launched using the loginhook
3) A single Non-GUI executable launched using the MCX loginhook system (can be run instead of or in addition to #2)
- note: the next two items have corresponding structures in /System/Library, and possibly in ~/Library
4) Items (possibly GUI) launched with a plist in /Library/LaunchAgents that don't have a LimitLoadToSessionType of Loginwindow
5) Non-GUI items launched out of /Library/LaunchDaemons
-note: the next two items used to be able to have GUI's, but the 10.5loginwindow environment now does not allow GUIs unless a number ofhoops are jumped, neither of these qualifies (without some seriouswork-arounds)
6) Non-GUI applications launched out of /Library/StartupItems or /System/Library/StartupItems
7) Non-GUI applications launched out of /etc/mach_init.d, /etc/mach_init_per_login_session.d, or /etc/mach_init_per_user.d
8) Items launched out of /etc/rc.* (it is possible to launch GUI applications out of here in some circumstances)
目前看到的Apple官方关于Daemons and agents的比较全面的文章:
Technical Note TN2083
Daemons and agents
http://developer.apple.com/technotes/tn2005/tn2083.html#SECSYSTEMLOGINITEM
还有这个是关于如何在用户登录的时候启动程序的:
Technical Note TN2228
Running At Login
http://developer.apple.com/technotes/tn2008/tn2228.html