Frequently Asked Questions

Stop iTunes From Launching When You Press The Play/Pause button On Your Headphones
Last Updated 5 years ago

Every time I hit the “Play” button on my headphones iTunes opens up even if I am using a different music app. Can I stop this from happening?

As it turns out, yes you can. There have been many tricks for this over the years, as different methods keep breaking with new versions of Mac OSX, but here’s what works as of 2016. This has been tested it on Mac OSX Sierra and Mavericks but it may work on earlier versions as well.

How to Stop iTunes from Opening when you press the Play/Pause Button

First, head to Applications > Utilities and open the Terminal. Alternatively, you can search for Terminal with Spotlight.

Once you’ve got the Terminal open, run this command:

launchctl unload -w /System/Library/LaunchAgents/

Here’s a quick breakdown of what this all means, so it feels a little bit less like a magic spell:

launchctl is a simple application on your Mac for controlling agents that run in the background.

The word unload tells launchctl you want to disable a particular agent.

/System/Library/LaunchAgents/ is the location of the agent you are disabling. Agents run in the background; this one launches iTunes when the “Play” key is pressed.

Once you’ve run the command, try pressing Play/Pause button on your headphones. Nothing happens!

How to Undo This Setting (and Restore the Default Behavior)

To undo this magical change, you just need to run this command:

launchctl load -w /System/Library/LaunchAgents/

As you can see, this is nearly identical to the previous command, just with the word load instead of unload.

Press Play, and iTunes will reappear as it used to.

Please Wait!

Please wait... it will take a second!