Prevent iTunes opening on Play/Pause button in macOS

Solution 1:

  1. From the Apple menu, choose “Restart…” > “Restart“.
  2. Simultaneously press and hold the “Command” and “R” buttons. (This will start you in Recovery Mode)
  3. Type the following to disable the System Integrity Protection and press enter:

csrutil disable

  1. Then restart and let the login proceed as normal. Once you’re in, run the following command to disable the f#?! iTunes. This will prevent you opening iTunes

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

  1. Reenable the System Integrity Protection to the previous status (enabled):

csrutil enable

To disable the 3 music keys is this command:

launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist

Bye bye iTunes :)