If you don’t see the login window, restart your Mac, press and hold the Shift key when you see the progress bar in the startup window, then release the Shift key after the desktop appears. See also Change Users & Groups Login Options preferences on Mac Change your password, user picture, or automatic login items on Mac Set up users, guests.
- Change Startup Items Mac
- Startup Items Mac Os X
- Apple Startup Items
- Mac Library Startup Items
- Mac Os Remove Startup Items
Deprecation Note: Startup items are a deprecated technology. Launching of daemons through this process may be removed or eliminated in a future release of OS X.
Apr 01, 2020 Mac startup key combinations Learn about the Mac features and tools that you can access by holding down one or more keys during startup. To use any of these key combinations, press and hold the keys immediately after pressing the power button to turn on your Mac, or after your Mac. And you’ll see your top-level folders. Double-click on “Library,” then, and you’ll find the folder labeled “LaunchAgents.”. Another way to do this same thing is to use Finder’s “Go to Folder” command, accessible from the “Go” menu or by pressing Shift-Command-G. Aug 08, 2013 The Early Boot Process Boot ROM. When the power to a Macintosh computer is turned on, the BootROM firmware is activated. BootROM (which is part of the computer’s hardware) has two primary responsibilities: it initializes system hardware and it selects an operating system to run. Jan 12, 2020 You can access the hidden Library folder without using Terminal, which has the side effect of revealing every hidden file on your Mac. This method will only make the Library folder visible, and only for as long as you keep the Finder window for the Library folder open. Feb 17, 2010 Gone are the days of Mac OS System 9 where all startup items were sitting nicely in a system folder labeled ‘Startup’, now with the Unix undercore of Mac OS X things are a bit more complicated, with some startup and login scripts and apps launching beyond the easily accessible ‘Login Items’ preference pane. May 09, 2003 The main difference is that this folder is used for third-party software, as opposed to the preinstalled Mac OS X items stored in the /System/Library folder. If you install Timbuktu Pro, it will install a Startup Item in this folder. This item is needed for the Timbuktu software to be active at startup, no matter which user logs in.
Unless your software requires compatibility with OS X v10.3 or earlier, use the launchd
facility instead. For more information, see Creating Launch Daemons and Agents.
A startup item is a specialized bundle whose code is executed during the final phase of the boot process, and at other predetermined times (see Managing Startup Items). The startup item typically contains a shell script or other executable file along with configuration information used by the system to determine the execution order for all startup items.
The /System/Library/StartupItems
directory is reserved for startup items that ship with OS X. All other startup items should be placed in the /Library/StartupItems
directory. Note that this directory does not exist by default and may need to be created during installation of the startup item.
Anatomy of a Startup Item
Unlike many other bundled structures, a startup item does not appear as an opaque file in the Finder. A startup item is a directory whose executable and configuration property list reside in the top-level directory. The name of the startup item executable must match the name of the startup item itself. The name of the configuration property list is always StartupParameters.plist
. Depending on your needs, you may also include other files in your startup item bundle directory.
To create your startup item:
Create the startup item directory. The directory name should correspond to the behavior you’re providing.
Example:
MyDBServer
Add your executable to the directory. The name of your executable should be exactly the same as the directory name. For more information, see Creating the Startup Item Executable.
Create a property list with the name
StartupParameters.plist
and add it to the directory. For information on the keys to include in this property list, see Specifying the Startup Item Properties .Example:
MyDBServer/StartupParameters.plist
Create an installer to place your startup item in the
/Library/StartupItems
directory of the target system. (Your installer may need to create this directory first.)Your installer script should set the permissions of the startup item directory to prevent non-root users from modifying the startup item or its contents. For more information, see Startup Item Permissions.
Important: A startup item is not an application. You cannot display windows or do anything else that you can’t do while logged in via ssh. If you want to launch an application after login, you should install a login item instead. For more information, see Adding Login Items.
Creating the Startup Item Executable
The startup item executable can be a binary executable file or an executable shell script. Shell scripts are more commonly used because they are easier to create and modify.
If you are implementing your startup item executable as a shell script, OS X provides some code to simplify the process of creating your script. The file /etc/rc.common
defines routines for processing command-line arguments and for gathering system settings. In your shell script, source the rc.common
file and call the RunService
routine, passing it the first command-line argument, as shown in the following example:
The RunService
routine looks for StartService
, StopService
, and RestartService
functions in your shell script and calls them to start, stop, or restart your services as needed. You must provide implementations for all three routines, although the implementations can be empty for routines whose commands your service does not support.
If your startup-item executable contains code that might take a long time to finish, consider spawning off a background process to run that code. Performing lengthy startup tasks directly from your scripts delays system startup. Your startup item script should execute as quickly as possible and then exit.
For more information about writing shell scripts, see Shell Scripting Primer.
Note: Most Apple-provided startup items have a test in the script to check to see if a particular variable is set to prevent automatic starting of daemons unless they are enabled (usually in the System Preference sharing pane).
To enable or disable a daemon that does not have a GUI checkbox, you must add or modify these variables directly by editing the file /etc/hostconfig
. Note that this file is writable only by the root
user, so this technique is discouraged. (Use a launchd
daemon instead, if at all possible.)
Specifying the Startup Item Properties
The configuration property list of a startup item provides descriptive information about the startup item, lists the services it provides, and lists its dependencies on other services. OS X uses the service and dependency information to determine the launch order for startup items. This property list is stored in ASCII format (as opposed to XML) and can be created using the Property List Editor application.
Note: In OS X v10.4 and later, the dependency information for many stubbed-out system startup items is still present in case other startup items depend on it.
Table A-1 lists the key-value pairs you can include in your startup item’s StartupParameters.plist
file. Each of the listed arrays contains string values. You can use the Property List Editor application that comes with the Xcode Tools to create this property list. When saving your property-list file, be sure to save it as an ASCII property-list file.
Key | Type | Value |
---|---|---|
Description | String | A short description of the startup item, used by administrative tools. |
Provides | Array | The names of the services provided by this startup item. Although a startup item can potentially provide multiple services, it is recommended that you limit your startup items to only one service each. |
Requires | Array | The services provided by other startup items that must be running before this startup item can be started. If the required services are not available, this startup item is not run. |
Uses | Array | The services provided by other startup items that should be started before this startup item, but which are not required. The startup item should be able to start without the availability of these services. |
For example, here is an old-style plist:
And here is an XML plist example:
The service names you specify in the Requires
and Uses
arrays may not always correspond directly to the name of the startup item that provides that service. The Provides
property specifies the actual name of the service provided by a startup item, and while this name usually matches the name of the startup item, it is not required to do so. For example, if the startup item launches multiple services, only one of those services can have the same name as the startup item.
If two startup items provide a service with the same name, the system runs only the first startup item it finds with that name. This is one of the reasons why your own startup items should launch only one service. If the name of only one of the services matches the name of another service, the entire startup item might not be executed and neither service would be launched.
The values of the Requires
and Uses
keys do not guarantee a particular launch order.
In OS X v10.4 and later, most low-level services are started with launchd
. By the time your startup item starts executing, launchd
is running, and any attempt to access any of the services provided by a launchd
daemon will result in that daemon starting. Thus, you can safely assume (or at least pretend) that any of these services are running by the time your startup item is called.
For this reason, with few exceptions, the Requires
and Uses
keys are largely irrelevant after OS X v10.3 except to support service dependencies between two or more third-party startup items.
Managing Startup Items
During the boot process, the system launches the available startup items, passing a start
argument to the startup item executable. After the boot process, the system may run the startup item executable again, this time passing it a restart
or stop
argument. Your startup item executable should check the supplied argument and act accordingly to start, restart, or stop the corresponding services.
Note: In general, with the exception of daemons provided with OS X, the system will only run your startup script with start
or stop
arguments (at boot and shutdown, respectively). Users, however, may elect to use the restart
argument.
You should not make any assumptions about the order in which daemons will be shut down.
If you want to start, restart, or stop startup items from your own scripts, you can do so using the SystemStarter
program. To use SystemStarter
, you must execute it with two parameters: the desired action and the name of the service provided by the startup item. For example, to restart the Apache Web server (prior to OS X v10.4), you would execute the following command:
Change Startup Items Mac
Important: You must have root authority to start, restart, or stop startup items.
Startup items should always respect the arguments passed in by SystemStarter
. However, the response to those arguments is dependent on the startup item. The stop and restart options may not make sense in all cases. Your startup item could also support the restart option using the existing code for stopping and starting its service.
Displaying and Localizing a Startup Message
When your startup item starts at boot time, you may (if desired) display a message to the user. To do this, use the ConsoleMessage
command. (You can use this command even if the computer is not starting up, but the user will not see it unless the Console application is running.)
For example:
If you want to localize the message displayed when a startup item starts, you must create a series of property list files with localized versions of the strings. Each of these files must be named Localizable.strings
, and must be in a localized project directory whose name is based on the name of a language or locale code for the desired language. These folders, in turn, must be in a folder called Resources
in the startup item folder.
For example, you might create a tree structure that looks like this:
Within each of these localizable strings files, you must include a dictionary whose keys map an English string to a string in another language. For example, the French version of the PrintingServices
localization file looks like this:
Whenever the ConsoleMessage
command is passed the string “Starting printing services”, if the user’s language preference is French, the user will instead see “Démarrage des services d’impression” at startup. C’est très bien!
Jan 12, 2020 You can access the hidden Library folder without using Terminal, which has the side effect of revealing every hidden file on your Mac. This method will only make the Library folder visible, and only for as long as you keep the Finder window for the Library folder open. Python library directory mac.
The value of the key field must precisely match the English string printed by your startup item using ConsoleMessage
.
See the manual page for locale
for more information about locale codes.
Startup Item Permissions
Because startup items run with root authority, you must make sure your startup item directory permissions are set correctly. For security reasons, your startup item directory should be owned by root, the group should be set to wheel, and the permissions for the directory should be 755 (rwxr-xr-x). This means that only the root user can modify the directory contents; other users can examine the directory and view its contents, but cannot modify them. The files inside the directory should have similar permissions and ownership. Thus, the file listing for the Apache startup item directory is as follows:
Important: In OS X version 10.4 and later, the system asks the user what to do about startup items with incorrect permissions. At this point, the user may choose to disable the startup item, which could have unexpected results for your software. To avoid this, be sure to set the permissions during installation.
Copyright © 2003, 2016 Apple Inc. All Rights Reserved. Terms of Use Privacy Policy Updated: 2016-09-13
Troubleshooting Startup and Login Items
This FAQ, derived from our book Troubleshooting Mac® OS X, provides a procedure for determining if Startup Items or Login Items may be the cause of a problem.
Corrupted or incompatible Startup or Login Items can cause a variety of problems, including:
Startup Items Mac Os X
- Kernel panics.
- Finder™ crashes on startup or login, either once or repeatedly.
- Slow startup or login.
- Failed startup or login
Apple Startup Items
Third-party interface modifications — hacks or 'haxies '— and menu extras — the icons on the right side of the Apple menu bar under Mac OS X 10.3 and later — are often launched as Startup or Login Items.
The use of the terms Startup Items and Login Items has varied between versions of Mac OS X:
- The term Startup Items has been used consistently in Mac OS X for system-wide applications or processes launched at startup and before any users log in to their accounts.
- The term for account-specific applications or processes launched when a user logs in to their account has varied from Mac OS X 10.2 to 10.4, as follows:
- Mac OS X 10.2 Jaguar, Mac OS X 10.4 Tiger®, and later use the term Login Items.
- Mac OS X 10.3 Panther® uses the term Startup Items.
Beginning in Tiger, the direction has been to replace Startup Items with daemons and user agents managed by the launchd process. Like Startup Items, daemons are background processes that provide services to all users; user agents — agents for short — are background processes that provide services to one or more users. The move to daemons and agents gained substantial momentum in Mac OS X 10.5 Leopard®. Advice on troubleshooting daemons and agents is covered in our book Troubleshooting Mac OS X, Leopard Edition.
1. | Start up in Safe Mode. |
To identify if incompatible Startup or Login items are causing problems, start up in Safe Mode. If Safe Boot resolves the issue, this implies a Startup Item or Login Item is the cause. Follow the remaining steps in this procedure to determine the specific Startup or Login Items at fault. Note that Safe Mode has certain operating limitations. Under Tiger, any fonts you disabled using Font Book will be enabled when you next restart or log in to your Mac. | |
2. | Rule out third-party interface modifications and menu extras. |
If you are using third-party interface modifications or menu extras:
If this resolves the problem, report the problem to the developer or vendor of the application causing the problem. | |
3. | Troubleshoot account-specific Startup or Login Items. |
Account-specific Startup Items (Panther) or Login Items (Tiger, Jaguar) are launched when a user logs in to their account. They are used to launch specific applications or open specific documents or folders when the user logs in to their account. You define account-specific Startup Items (Panther) or Login Items (Tiger or Jaguar) for your account as follows:
Third-party applications may add items to these lists. Troubleshoot these via process-of-elimination:
| |
4. | Troubleshoot system-wide Startup Items. |
Third-party applications may install system-wide Startup Items in the Computer > Macintosh HD > Library > StartupItems folder. System-wide Startup Items are launched when you start up your Mac and before any users can log in to their accounts. They are used to start system-wide processes that should be run before users log in to their accounts, such as anti-virus software, or to launch system-wide processes that can be available to all users, such as a background process used by a third-party application. Troubleshoot these via process-of-elimination:
|
Mac Library Startup Items
Related links
Mac Os Remove Startup Items
- Finder issues? How to delete its preferences.
- Resolving Kernel Panics.
- Tuning Mac OS X Performance.