3

How to remove startup items on your Mac | Macworld

 1 year ago
source link: https://www.macworld.com/article/221774/how-to-find-and-remove-mac-startup-items.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How-To

How to find and remove startup and login items on your Mac

Is your Mac starting up slowly? A mess of startup and login items might be to blame.
Senior Editor, Macworld APR 7, 2023 3:00 am PDT
MacBook startup
Image: Foundry

When you turn on your Mac, various apps, add-ons, and invisible background processes start running all by themselves. This is usually what you want, but you may sometimes see items running that you don’t recall adding yourself. Where do they come from?

Sometimes these processes and apps can cause problems, and you need to remove them for your Mac to behave normally. And even if there’s not a problem, such items can increase your Mac’s startup time and may decrease performance, you’ll want to make sure your Mac is loading only items that are useful to you. Here’s a quick primer on the various kinds of startup and login items and how to manage them.

Login items

MacOS 13 (Venutra) or later: Open System Settings and click on General, then click Login Items. You’ll see a list of apps that open every time you log in, followed by a list of the apps that are allowed to run processes in the background even when the app is not running (such as checking for updates or syncing data).

Mac startup items

Foundry

MacOS 12 (Monterey) or earlier: Open System Preferences and click on Users & Groups, then the Login Items tab. You’ll see a list of apps (and even files and folders) that open every time you log in. This list is different for each user account on your Mac.

loginitems-100052043-large.png?auto=webp&quality=85,70

Items usually end up on this list because an app you installed added them to it. Most apps that do so ask you for permission first or have an “Open at login” or similar checkbox in their settings. In any case, you can add an item to the list manually by clicking the (+) button, or remove an item by selecting it and clicking the minus sign (-) button. You’ll likely also need to login into your Mac user profile to make changes

StartupItems folder

Earlier versions of macOS relied on two folders—/Library/StartupItems and /System/Library/StartupItems—to hold items designated to load when you start your Mac. Apple now discourages the use of the StartupItems folders, but some old apps might still use them.

Normally your /System/Library/StartupItems folder should be empty, but if it contains something that you don’t use anymore, you can drag the unwanted item to the Trash to prevent it from loading automatically the next time you start your Mac.

Launch daemons and agents

Since OS 10.4 Tiger, Apple has given developers another mechanism for launching items automatically: launch daemons and agents that are controlled by the launchd process. This provides more flexibility for developers but it is less transparent to users.

Instead of opening apps directly, launchd loads specially formatted .plist documents that specify what should launch and under what circumstances. Sometimes these launch items run constantly in the background, sometimes they run at scheduled intervals, and sometimes they run as needed—for example, in response to an event such as a change in a certain file or folder—and then quit.

The .plist files that launchd uses can occupy any of three folders, and their location determines when each item loads and with what privileges:

  • Items in /Library/LaunchDaemons and /System/Library/LaunchDaemons load when your Mac starts up, and run as the root user.

  • Items in /Library/LaunchAgents and /System/Library/LaunchAgents load when any user logs in, and run as that user.

  • Items in /Users/[your-username]/Library/LaunchAgents load only when that particular user logs in, and run as that user.

Don’t change System files: Of those folders, the two located in the /System folder (/System/Library/LaunchDaemons and /System/Library/LaunchAgents) are for components included as part of macOS, and you should resist the temptation to remove or alter them—they’re likely essential to keep your Mac running correctly.

Modify others as you like: Feel free to browse through the files in the other folders to see what’s there. You can modify them—for instance, to disable them or to change how often they run—but before you do, you should understand a few things about how they work.

One of the great annoyances of macOS has been the buildup and maintenance of these .plist files. With macOS 13, Apple has provided a way for developers to keep these helper files within the app bundle itself, so they go away when you delete the app. It’s a lot cleaner and easier, but apps have to be specifically developed for macOS 13 to use this system, so it will be a while before it is the norm.

When you start your Mac or log in, the launch items in the relevant folders are loaded (that is, registered with the system) unless they have a Disabled flag set. Thereafter, their instructions will be carried out until you restart, even if you drag the launch item to the Trash. To see a list of all the currently loaded launch items on your Mac, open Terminal (in /Applications/Utilities) and type launchctl list and then press Return.

If you want to stop a launch item from running without your having to restart, open the Terminal app and type launchctl unload followed by a space and the full path to the launch item. For example, take this command:

launchctl unload ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist 

It unloads the launch agent that enables AppleScript folder actions. Repeat the command with load instead of unload to turn it back on.

Tip: An easy way to add an item’s full path is to drag the item from Finder to the Terminal window.

Because most launch items run on a schedule or on demand, and because any of them could be disabled, the fact that something is present in one folder doesn’t necessarily mean the process it governs is currently running. To see what’s running at the moment, open Activity Monitor—but bear in mind that the name of a given process as shown in Activity Monitor might not resemble the name of the .plist file that tells macOS to launch it.

Other explanations for mystery processes

Although these methods are the most common ways to launch apps automatically in macOS, they aren’t the only ones. If you have a mystery process that you can’t track down in any of these places, it could also be one of these:

Kernel extensions: Kernel extensions, or .kext files, live in /System/Library/Extensions and load at startup. They provide low-level features such as processing audio and adding support for peripherals. Most kexts on your Mac are part of macOS. The safest way to remove a third-party kext is to run an uninstaller provided by the developer.

Cron: Cron is a Unix scheduling utility built into macOS. It’s more-or-less not used anymore in favor of launchd, but you never know what might be lingering on a Mac that has gone through a lot of updates or is running old software.

Login scripts: Login scripts, like startup items, were used in older versions of macOS but are now deprecated.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK