How to Prevent Mac Keyboard Media Shortcuts from Opening iTunes

I use Spotify all the time and find it highly annoying when the play button on my keyboard opens iTunes instead of controlling Spotify. This happens with other media buttons too once iTunes is open.

I don’t use iTunes at all so I found a solution to prevent this nonsense from happening. Follow the steps below if you want to do the same.

The first step is to diable Apple’s SIP. Once you apply the command to disable execution of iTunes you should perform the steps again to re-enable SIP.

From the Apple menu, choose “Restart…” > “Restart“.

Simultaneously press and hold the “Command” and “R” buttons. This will start you in Recovery Mode.

Select “Utilities” > “Terminal“.

Type one of the following, then press “Enter“:

Disable System Integrity Protection: csrutil disable

Enable System Integrity Protection: csrutil enable

Then restart and let the login proceed as normal. Once you’re in, run the following command:

sudo chmod -x /Applications/iTunes.app/Contents/MacOS/iTunes

This will prevent iTunes from opening, so make sure that is what you really want. If you still want to use iTunes for any purpose (for example iPhone and iPad backups) this method above won’t work for you, as it will prevent the backups from taking place.

If you want to go back to default behavior, you can enter Terminal once again (make sure you disable SIP again before) and type in the following:

sudo chmod +x /Applications/iTunes.app/Contents/MacOS/iTunes

Alternative: Using an Application

If you want to retain the ability to use iTunes for other purposes, and use Spotify for your media, I suggest installing the High Sierra Media Key Enabler. Download the app and move it to your Applications folder. Double-click to start it and you will see a black dot appear in your taskbar. Click on the dot and make sure that the option to start on session initialisation is ticked. Then change the option to give priority to Spotify over iTunes for your media keys.

Related Content

About Jean

Comments

So…. I tried this as well, and my media keys have STOPPED working altogether as well! Even when Spotify is the active application pause/play and prev/next don’t work. I tried both with and without the MediaKey Forwarder…. no luck.

@Jean Galea: you suggest using the same Terminal command to enable iTunes again? how is that possible? I can’t get it to work. Please reply, the situation is worse after your suggestion 🙁

I’m not sure what to suggest as I’m on the latest MacOS and things still work fine for me, perhaps because I applied this before doing the latest updated? It doesn’t make much sense to me that that would affect things though.

If anyone knows the latest way to achieve this let me know and I’ll update the post.

HSMKE only allows you to CHOOSE between Spotify and iTunes. I want to use my media keys with a 3rd party app and not have iTunes open every time I press play. noTunes prevents iTunes from launching, while enabled. Works perfectly for me.

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Participate in this conversation via emailGet only replies to your comment, the best of the rest, as well as a daily recap of all comments on this post. No more than a few emails daily, which you can reply to/unsubscribe from directly from your inbox.