The Unwanted Concert
A common frustration for macOS users is having the Apple Music app (or iTunes on older systems) automatically launch and begin playback the moment you connect your AirPods, plug in a pair of wired headphones, or press a media key on your keyboard. You might connect your AirPods intending to join a Zoom meeting, only to have Music hijack the audio output and start blasting the last song you were listening to at full volume. This auto-launch behaviour is deeply embedded in how macOS handles media key events and Bluetooth audio device connections, making it feel almost impossible to prevent without knowing exactly where to look.
Preventing Music from Auto-Launching
To stop macOS from automatically opening the Music app when you connect headphones or press a media key, you need to revoke its ability to respond to these system events.
The most reliable method involves adjusting the Music app’s own preferences and the system’s Login Items. First, open the Music app. In the top menu bar, click Music > Settings… (or Preferences on older macOS). Navigate to the General tab. Look for any option related to automatic playback and ensure it is unchecked. Next, close Music and open System Settings > General > Login Items. Scroll through the list and remove Music from the “Open at Login” section if it appears there. Additionally, check the “Allow in the Background” list below and toggle off Music if listed. For a more robust solution, you can prevent Music from responding to media keys entirely by installing a lightweight open-source utility called noTunes (available on GitHub). Once installed, noTunes sits in your menu bar and silently intercepts any attempt by macOS to auto-launch Music, blocking it before the app window even appears.