In Mac OS x, there are three ways to implement the configuration of a startup item

Source: Internet
Author: User
Tags list of attributes

Mac OS x startup Item Settings

How Mac OS X starts:

1,mac firmware activated, initialize hardware, load bootx bootloader.

2,bootx load kernel and kernel extension (kext).

3, the kernel starts the launchd process.

4,launchd according to /system/library/launchagents,/system/library/launchdaemons,/library/launchdaemons,/ Library/launchagents, ~/library/launchagents in the plist configuration, start the service daemon.

In Mac OS X , there are three ways to implement the configuration of a startup item:

    1. Login Items;2)startupitems;3)launchd daemon

1.Login Items

Open System Preferences, select System-Accounts, select the Login Items tab, and the /applications directory the. App is dragged directly into the list on the right. After you restart your computer, you will see that the program on the list starts automatically after it is powered on.

2.StartupItems

Definition:startupitems: A program that runs during system startup, which can be a program that terminates immediately after running (for example, emptying the trash on the boot), or a background process that has been running for the duration of the system.

Path:

1)/system/library/startupitems

2)/library/startupitems

Most of the system-related startupitems are placed under the/system/library/startupitems path, which is preceded by /library/startupitems path execution, because the Startupitems in the former path provides a system-level base service, such as crash reporting,core graphics services ,system accounting, and so on, while the latter path does not exist by default, it needs to be created manually.

For example: Here we take the icebergcontroltower of the/library/startupitems directory as an example.

In a nutshell, on Mac OS X , a startupitems contains the following two things:

1) enforceable procedures;

    1. A plist file (startupparameters.plist) that contains dependent process relationships.

For example:

Startupparameters.plist is a list of attributes that contain the necessary conditions for running an executable program.

Create a startupparameters.plist file

The executable File is created:

Note:1) The name of the executable file is the same as the filename of the folder in whichit resides, which is the default rule for the system.

2) root permission is required to operate the executable file .

3) The executable file is a shell script.

Open The icebergcontroltower file directory under the same name executable file, you can see the specific contents of the script:

3. Launchd Daemon

Launchd is a critical process for initializing the system environment under MAC OS, which is the first process that starts in the OS environment after the kernel is loaded successfully .

Configuration file path: Create plist under ~/library/launchagents path
For example : the plist file format and the meaning of each field:

Create a plist file:

In Mac OS x, there are three ways to implement the configuration of a startup item

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.