Wednesday, July 5, 2023

How to Diagnose and Control Login and Background Items

Howard Oakley:

[From] Ventura onwards property lists that previously had to be installed in Library LaunchDaemons and LaunchAgents folders can now be kept inside their app, making them even harder to locate.


If your Mac has been in use some years, or has been migrated from an older system, you’re likely to see many Background Items listed here. However, your control over them is limited: all you can do is turn them off and on. If you try disabling some of them, you may see that they’re automatically re-enabled. Many appear unidentifiable. A few have Info buttons, revealing where they are on your Mac, but many don’t.


To remove all third-party Login Items and reset to installation defaults, you can use the undocumented command:

sudo sfltool resetbtm


A better and more systematic approach is to obtain a detailed listing of all those Background Items, and uninstall or delete those you no longer need, or are just old and unnecessary. For this, you need a BTM dump, using another undocumented option to the sfltool command:

sudo sfltool dumpbtm > ~/Documents/btmdump.text


If you see the right name [on a new machine/VM], it’s likely that your product is built correctly. If that same product shows the wrong name in other environments, it’s reasonable to assume that this is a bug in macOS.

Such bugs are very common on development machines. The code that gets the name of your product relies on the Launch Services database, and it’s not uncommon for the building and rebuilding you do on your development machine to thoroughly scramble that database. That’s why testing on a fresh machine is so important.

OTOH, if this test shows the wrong value you need to start looking at your code.


Update (2023-07-11): Howard Oakley:

At any given time your Mac has several hundred background activities scheduled, most of them by macOS. These include important services like making scheduled Time Machine backups, and a great many whose benefits may be less apparent, such as running medianalysisd to keep your Photos library and other media up to date. When one or more of those stop working, they can be hard to detect, with backups being one of the more obvious. Because most of these are run by a hidden scheduling system, there are essentially no user controls, and recognising the problem requires browsing the log. So what can you do if they stop running reliably?

2 Comments RSS · Twitter · Mastodon

Kevin Schumacher

Assuming I'm understanding this correctly, I've long used Lingon X to manage all of this. It does include managing items which are kept inside their app bundles, as far as I can tell.

@Kevin I’m not exactly sure what they do differently, but for me Lignon is showing as enabled some items that do not show up in System Settings and which I don’t think actually ever run; and it’s also missing some items that I do see in System Settings.

It’s definitely useful for showing more information about schedules and such, though.

Leave a Comment