Jean Galea

Health, Wealth & Happiness

  • Start Here
  • Guides
    • Investing in Crypto
    • Real Estate Crowdfunding
  • My Story
  • Blog
    • Cryptoassets
    • P2P Lending
    • Real estate
  • Podcast
  • Search

๐Ÿ™… How to Prevent Mac Keyboard Media Shortcuts from Opening iTunes

Last updated: March 24, 202018 Comments

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.

  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. Select โ€œUtilitiesโ€ > โ€œTerminalโ€œ.
  4. 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 Media Key Forwarder. 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.

That’s it! Enjoy your new found freedom from iTunes.

 

Filed under: Tech

Related

About Jean Galea

Jean Galea is a dad, amateur padel player, host of the Mastermind.fm podcast, investor and entrepreneur.

Comments

  1. Maxence L says

    May 4, 2020 at 8:31 am

    Hi there,

    I’m on Catalina and this Terminal operation worked for me :

    Once youโ€™ve got the Terminal open, run this command:

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

    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/com.apple.rcd.plist 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 on your keyboard. Nothing happens!

    Source : https://www.howtogeek.com/274345/stop-itunes-from-launching-when-you-press-play-on-your-macs-keyboard/

    Reply
  2. Nick says

    June 20, 2019 at 12:58 am

    yeah I pressed Cmd R when restarted but am presented with Restore MacOS, Use Disc Utility etc no Terminal access.

    And going back what others have said about totally diabling iTunes, I feel I should leave this alone.

    I use VOX as my main music player and it has it’s own extension keys, which is supposed to take over the media keys, but doesn’t, they still control iTunes, so thought this method may help but looks like that’s a no.

    Reply
  3. Xyverz says

    February 20, 2019 at 5:38 pm

    I’m going to have to argue that this method is a *very* bad idea. Disabling System Integrity Protection can be a Very Bad Thingโ„ข. A better option would be to grant accessibility access to the app you’d rather control in question:

    1) Open Sytem Preferences
    2) Select Security and Privacy
    3) Click the Privacy tab
    4) Choose “Accessibility”
    5) Tic the box for the application you want to control with the media keys, then restart said app.

    The above was found in this reddit comment: https://www.reddit.com/r/MacOS/comments/8r4vve/macos_mojave_media_keys/e7lvt84/

    Reply
    • nutjob says

      May 9, 2019 at 9:03 am

      Au contraire, disabling it means freeing yourself from the Apple thought police, and lets you install (or diable) any software you want, not just that of which Apple approves.

      Reply
  4. Tyran Van Zyl says

    February 4, 2019 at 1:38 pm

    How are you guys getting into Terminal? I just see Disk Utility which has First Aid, Partition. Erase Restore etc

    Reply
  5. Travis Robison says

    December 20, 2018 at 7:53 pm

    thanks!!! makes me sad that this is even a thing. but i really appreciate the csrutil disable hint.

    Reply
  6. Marty says

    November 14, 2018 at 2:41 pm

    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 ๐Ÿ™

    Reply
    • Jean says

      November 14, 2018 at 8:49 pm

      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.

      Reply
    • Martin says

      November 14, 2018 at 9:51 pm

      I’m citing what “m” replied to me:

      “to restore iTunes, the other command should be โ€œchmod +xโ€.”

      It did the trick for me, iTunes is back again and the buttons works like normal again.

      Reply
  7. m says

    November 13, 2018 at 1:41 pm

    to restore iTunes, the other command should be “chmod +x”.

    Reply
    • Martin says

      November 14, 2018 at 9:49 pm

      Thx a lot!!! That did the trick.

      Reply
  8. Martin says

    November 8, 2018 at 4:42 pm

    I tried this and realised that I wasn’t able to open iTunes at all afterwards. That’s NOT what I wanted. Then I tried to go back to default behavior following your steps but IT DOESN’T WORK.

    Please tell me and others how to be able to open iTunes again!

    (All I wanted was iTunes NOT to open when pressing the play/F8 button but this tip totally disables the ability to open iTunes!)

    Reply
    • Timo Denk says

      November 23, 2018 at 2:50 pm

      You have to use +x instead of -x. The second command is wrong.

      Reply
      • Jean says

        November 24, 2018 at 6:31 pm

        Fixed.

  9. Chris says

    October 22, 2018 at 1:54 pm

    Since I upgraded to Mojave this morning the hotkeys were mapped to open iTunes again. Previous MacOS worked perfectly with Google Music in my Chrome browser.

    Followed your first tip disabling Apple’s SIP and running the terminal command. No luck! And I’m not able to re-enable the default behaviour. Even after enabling and disabling the SIP again.

    So.. mediakeys don’t do anything anymore.
    I would suggest people not to follow this tip.

    Reply
    • Jean says

      February 5, 2019 at 11:01 pm

      Strange, it still works for me.

      Reply
  10. kyle Voltz says

    September 17, 2018 at 6:13 pm

    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.

    https://github.com/tombonez/noTunes

    Reply
    • Jean says

      February 5, 2019 at 11:01 pm

      Thanks for the suggestion, will check it out.

      Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords or links in the name field.

Latest Padel Match

Jean Galea

Investor | Dad | Global Citizen | Athlete.

Follow @jeangalea

  • Padel
  • Affiliate Disclaimer
  • Cookies
  • Contact

Copyright © 2021 · Hosted at Kinsta · Built on the Genesis Framework