The startup process of the MAC system
can see:
Http://hi.baidu.com/%CB%E6%B7%E7%B6%F8%D0%D01999/blog/item/271d20a694d7d49dd0435842.html
1 Mac boot up script or application (run shell script at system startup)
1 if you want to start a Mac application (that is, Xxx.app), you can set it through a graphical interface:
System Prefernce-->accounts-->logitems-->add
2 Put the shell or application you want to start into the/labrary/startupitems/directory.
3 Create the/etc/rc.local file and write the script in the file.
4 If you only start the shell program, there is another way, the general process is like this.
A) Set the Terminate to boot. This allows the shell to run automatically when the system is started.
(B) Create or modify ". Profile" in the user directory. When the shell starts, run the. Profile file First
(C) Call the shell script that you want to execute in ". Profile"
5 Application of Mac Launchd, see also: http://cb.esast.com/cb/wiki/10020
Apple's security check: With the 2,3 method described above, you must set the file's user ID and group ID, as well as the file's run permissions. The specific methods are described below.
When Setup is complete, you can use Systemstarter to debug configuration information on the terminal
Command is: systemstarter-n-D
Depending on the information you are prompted, you can view configuration issues.
2 Solve "insecure Startup Item disabled. Error"
You can put the shell you want to start in the/labrary/startupitems/directory.
You must change the user ID and group ID of the file, and the permission is 755
sudo chown-r root:wheel/library/startupitems/xxx
sudo chmod-r 755/library/startupitems/xxx
(If you are running a shell file, you do not need the-r option in the command)
Note: Environment variable problem.
Of course, make sure to refer to Apple's developer documentation:
Introduction to System Startup programming topics
Http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html #//apple_ref/doc/uid/10000172-sw1