Unofficial archive. This is a read-only, community-run archive of the Apple Support Community. It is not affiliated with or endorsed by Apple Inc.

There are numerous applications that launch everytime I turn on my MacBook Pro and I can't change it

Hi,


There are numerous applications that launch everytime I turn on my Mac Book Pro (M1 Max - 12.6.1). For instance Spotify launches everytime. I have gone to the Login Items (System Preferences/Users/Log-in Items) and there is nothing listed.


Thanks for any help.

12 replies


There is a way to view these 'hidden' items, but it requires a few steps.


First, some background...


  • As I understand, there are several ways an app or service can be 'automatically' launched:
    • LaunchDaemons (system-wide only)
    • LaunchAgents (system-wide or per-user)
    • StartupItems (system-wide or per-user)
    • "Shared file lists" (this may be part of one of the above)
    • By any running script or application
    • Using the legacy 'cron' system
    • Using the Service Management framework
      • This may be the 'preferred' method for user-installed apps, dating back to around the time 'Sandboxed' apps were introduced; an app installer isn't needed and its seems fairly 'auto-healing'.
    • (perhaps others I haven't thought of...)
  • Version 1.1.35 of Spotify.app contains the following files or packages that may be of interest:
    • /Applications/Spotify.app/Contents/Library/LoginItems/StartUpHelper.app
details
CFBundleIdentifier: com.spotify.client.startuphelper
CFBundleName: StartUpHelper
LSBackgroundOnly: True
      • This is the application that Spotify.app registers with the XPC services via the Service Management framework
  • /Applications/Spotify.app/Contents/MacOS/sp_relauncher
    • (this may have to do with software updates)


Data collection


Open a terminal window and copy/run the following commands, as desired:

  • Notes:
    • These are optimized for the 'bash' shell, so run the following before any of the others:
bash \
  # Load the 'bash' command shell, since 'zsh' is now the default on new installations
    • Replace 'less' with 'cat' in the following commands, as desired.


  • If you have set up more than one user account on your computer, get your numeric userID (usually 3 digits, starting with '50'), either
    • from the 'Advanced Settings' of the User & Groups part of the control panel ("System Preferences")
    • or by running the following command:
echo "show State:/Users/ConsoleUser" | scutil | awk '/kCGSSessionUserIDKey :/ { print $3 }'  \
  # Reference: https://macblog.org/uid/


  • View the XPC services loaded by apps via the Service Management framework:
    • View enabled items for user #501 (press 'q' to return to the command prompt):
less /var/db/com.apple.xpc.launchd/loginitems.501.plist \
  # Enabled items for user #501
    • View disabled items for user #501 (press 'q' to return to the command prompt):
less /var/db/com.apple.xpc.launchd/disabled.501.plist \
  # Disabled items for user #501
    • View system-wide disabled items (press 'q' to return to the command prompt):
less /var/db/com.apple.xpc.launchd/disabled.plist \
  # System-wide disabled items
    • Notes:
      • Replace "501" in each of the above commands with the desired numeric user ID
      • If you receive an error when running any of the above, try it again preceded with "sudo " to run that command with elevated privileges (the first time this is done in a particular window, you will be asked to enter your password)
      • I don't know what will happen if someone were to manually edit these files, but it is likely they would be re-generated at some point.


  • Show all applications in the /Applications folder that contain an embedded LoginItem:
find /Applications/*/Contents/Library/LoginItems/*.app -maxdepth 0


  • Show all LaunchAgents, LaunchDaemons, and StartupItems:
find \
  ~/Library/LaunchAgents \
  /Library/LaunchAgents \
  /Library/LaunchDaemons \
  /Library/StartupItems \
  /System/Library/LaunchAgents \
  /System/Library/LaunchAgentsIgnored \
  /System/Library/LaunchDaemons \
  /System/Library/StartupItems \
  -print | less \
  # Show all files in the above directories
  • (Press 'q' to return to the command prompt, press <SPACE> for the next page, and use the up/down arrows to scroll)


Final thoughts

  • There doesn't seem to be any built-in (at least not as of macOS 10.15) command-line tool to view (let alone control) Service Management framework login items (aka 'com.apple.xpc.smloginitem') used by applications such as Spotify.app.
  • Simply moving Spotify.app out of the /Applications folder probably won't do anything these days; moving it off of the boot partiti 000011CF on might. One could also store it in a disk image that they only mount when they wish to run it.


References





There is a way to view these 'hidden' items, but it requires a few steps.


First, some background...


  • As I understand, there are several ways an app or service can be 'automatically' launched:
    • LaunchDaemons (system-wide only)
    • LaunchAgents (system-wide or per-user)
    • StartupItems (system-wide or per-user)
    • "Shared file lists" (this may be part of one of the above)
    • By any running script or application
    • Using the legacy 'cron' system
    • Using the Service Management framework
      • This may be the 'preferred' method for user-installed apps, dating back to around the time 'Sandboxed' apps were introduced; an app installer isn't needed and its seems fairly 'auto-healing'.
    • (perhaps others I haven't thought of...)
  • Version 1.1.35 of Spotify.app contains the following files or packages that may be of interest:
    • /Applications/Spotify.app/Contents/Library/LoginItems/StartUpHelper.app
details
CFBundleIdentifier: com.spotify.client.startuphelper
CFBundleName: StartUpHelper
LSBackgroundOnly: True
      • This is the application that Spotify.app registers with the XPC services via the Service Management framework
  • /Applications/Spotify.app/Contents/MacOS/sp_relauncher
    • (this may have to do with software updates)


Data collection


Open a terminal window and copy/run the following commands, as desired:

  • Notes:
    • These are optimized for the 'bash' shell, so run the following before any of the others:
bash \
  # Load the 'bash' command shell, since 'zsh' is now the default on new installations
    • Replace 'less' with 'cat' in the following commands, as desired.


  • If you have set up more than one user account on your computer, get your numeric userID (usually 3 digits, starting with '50'), either
    • from the 'Advanced Settings' of the User & Groups part of the control panel ("System Preferences")
    • or by running the following command:
echo "show State:/Users/ConsoleUser" | scutil | awk '/kCGSSessionUserIDKey :/ { print $3 }'  \
  # Reference: https://macblog.org/uid/


  • View the XPC services loaded by apps via the Service Management framework:
    • View enabled items for user #501 (press 'q' to return to the command prompt):
less /var/db/com.apple.xpc.launchd/loginitems.501.plist \
  # Enabled items for user #501
    • View disabled items for user #501 (press 'q' to return to the command prompt):
less /var/db/com.apple.xpc.launchd/disabled.501.plist \
  # Disabled items for user #501
    • View system-wide disabled items (press 'q' to return to the command prompt):
less /var/db/com.apple.xpc.launchd/disabled.plist \
  # System-wide disabled items
    • Notes:
      • Replace "501" in each of the above commands with the desired numeric user ID
      • If you receive an error when running any of the above, try it again preceded with "sudo " to run that command with elevated privileges (the first time this is done in a particular window, you will be asked to enter your password)
      • I don't know what will happen if someone were to manually edit these files, but it is likely they would be re-generated at some point.


  • Show all applications in the /Applications folder that contain an embedded LoginItem:
find /Applications/*/Contents/Library/LoginItems/*.app -maxdepth 0


  • Show all LaunchAgents, LaunchDaemons, and StartupItems:
find \
  ~/Library/LaunchAgents \
  /Library/LaunchAgents \
  /Library/LaunchDaemons \
  /Library/StartupItems \
  /System/Library/LaunchAgents \
  /System/Library/LaunchAgentsIgnored \
  /System/Library/LaunchDaemons \
  /System/Library/StartupItems \
  -print | less \
  # Show all files in the above directories
  • (Press 'q' to return to the command prompt, press <SPACE> for the next page, and use the up/down arrows to scroll)


Final thoughts

  • There doesn't seem to be any built-in (at least not as of macOS 10.15) command-line tool to view (let alone control) Service Management framework login items (aka 'com.apple.xpc.smloginitem') used by applications such as Spotify.app.
  • Simply moving Spotify.app out of the /Applications folder probably won't do anything these days; moving it off of the boot partition might. One could also store it in a disk image that they only mount when they wish to run it.


References




Are these apps open at the time of shutdown? If they are then make sure this checkbox is not selected at the time of shutdown:



Spotify has its own startup on login setting in Spotify > Preferences…


Just to add, any apps you don't close will re-open when you start or restart your Mac.

Gary Goldblum wrote:

That worked.... Kinda a pain in the butt that you cannot control it all in one place.

You can control it all in one place in macOS 13 "Ventura". However, this functionality has proven quite problematic. There are several very long threads with people describing problems with it.

That worked.... Kinda a pain in the butt that you cannot control it all in one place.


Thanks!

Is there anyway to see a list of Log-in items that are basically "hidden"? There are some that I cannot even find in my apps folder.


Thanks again,


Gary

Gary Goldblum wrote:

Is there anyway to see a list of Log-in items that are basically "hidden"?

No.

There are some that I cannot even find in my apps folder.

Such as?

I think it's called Apogee Messenger. It just launches periodically. I bought an audio interface from Apogee and returned it.... I don't see it in my apps folder.

Gary Goldblum wrote:

I think it's called Apogee Messenger.

Contact Apogee support and ask them how to remove their software…

https://apogeedigital.com/support