3

I know there are Login Items under Users & Groups and /Library/LaunchAgents and /Library/LaunchDaemons under Library, System/Library and Users/FooUser/Library. And then there's right click on Dock icon -> Options -> Open at Login.

What other methods are there for apps to auto-start? The reason why I'm asking is because the Spotify App (downloaded from http://www.spotify.com) keeps starting up whenever I restart my Mac, even though I made sure there is no corresponding entry in any of the above mentioned places.

2

There are two places for LaunchAgents to be called from:

  • /Library/LaunchAgents - this launches a process at login for every user
  • ~/Library/LaunchAgents - this launches a process at login for a specific user.

The Spotify startup plist is found in the latter; the com.spotify.webhelper.plist allows you to open Spotify via the web.

Issue the command launchctl list | grep -i spotify and you should find (up to) two plists that are loaded:

$ launchctl list | grep spotify
-       0   com.spotify.client.startuphelper
9087    0   com.spotify.webhelper

To unload them, you can uncheck the option in Advanced Settings (Command,)

enter image description here

Or...

You can issue the command:

$ launchctl unload com.spotify.client.startuphelper.plist
  • Thank you for your reply. I did have com.spotify.webhelper.plist under ~/Library/LaunchAgents, but what I meant to say above, I removed these entries. However, it keeps reappearing whenever I reboot. "$ launchctl list | grep spotify" shows "com.spotify.client.startuphelper", but "launchctl unload com.spotify.client.startuphelper" returns "No such file or directory". Disabling it within the app as you described works, but I would prefer not depending upon the goodwill of applications to include such options. – makrom May 12 '18 at 23:12
  • You have to use the extension .plist. (I fixed the mistake). I just tested and it removes it and doesn't load. If it can't find the file, you can remove it from launchd with the command launchctl remove com.spotify.client.startuphelper.plist – Allan May 12 '18 at 23:25
  • Their startup behavior is actually pretty interesting. I have no entries in launchd, no plists, even in /Library but it's starting up anyway. I've created a test user, launched Spotify once without even logging in and it kept autostarting from then on. Even clearing the entire home folder of the user didn't stop it from launching. Wonder how they do it. – Захар Joe Nov 21 '18 at 9:46
  • The reason we should know is because malicious apps could use the same method to stay undetected. We've come to rely on cleaning LaunchAgents and LaunchDaemons and "Open at Login" but clearly there's some other obscure method involved. – Захар Joe Nov 21 '18 at 9:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .