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
- Disable System Integrity Protection:Â
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
Applications such as “Karabiner-Elements” or “BetterTouchTool” can be used to remap your keyboard keys or disable specific key functions.
That’s it! Enjoy your newly found freedom from iTunes.