🍿 Prevent iTunes from opening with noTunes
Snacks (🍿) are my collection of recipes for solving problems. Often recorded (and cleaned up) from actual discussions where I'm involved in helping others with technical problems. Not all solutions are mine but I started collecting them in one place because you never know when you need one.
Open nothing
noTunes is a macOS application that will prevent iTunes or Apple Music from launching.
Simply launch the noTunes app and iTunes/Music will no longer be able to launch. For example, when bluetooth headphones reconnect.
Open a different app
Set replacement for iTunes / Apple Music
Replace YOUR_MUSIC_APP
with the name of your music app in the following command.
Then /Applications/YOUR_MUSIC_APP.app
will launch when iTunes/Music attempts to launch.
This can be used to open a website too, for example, YouTube Music.
The following command will disable the replacement.