What can I do to stop the Play / Pause button from opening iTunes?

247,288

Solution 1

a better temporary fix is to start quicktime and just have it running(not playing a movie) in the background. It uses less ram/cpu than iTunes.

Solution 2

Update: There is a GUI available that performs the below steps, at the official website.

Fixing this is very simple. While the installation process does involve using Mac Terminal, you do not need any knowledge of it. I have included images to make it easier! Just follow 6 simple instructions below and you are done!

  1. Download this zip file

  2. Unzip the file

  3. Run the Patch.command file (Double Click It)

  4. It will open mac terminal. It will most likely prompt you to enter your password. Type your password and press enter. It should look similar to the image below:

    step 4

  5. At the bottom it will say "Everything is ready. Would you like to create a backup and apply the patch (y/N)". Type y, then press Enter. It should look similar to the image below:

    Step 5

  6. You are done! It should output some text and say [Process Complete] at the bottom. You can then close the mac terminal window. The process completing successfully should look similar to the image below:

    Step 6

Uninstall

If you want to remove this patch, simply run the Patch.command script again.

Here is the github repository Thanks to thebitguru for this script.

Solution 3

The real solution: Open Terminal, paste in the following line, and hit enter. You're done. To undo, change unload to load in the same line.

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

Solution 4

For controlling Spotify, use Shift + Option + Play button. iTunes does not react to this combination, but Spotify does.

Solution 5

andrew px and dmonner wrote an excellent workaround here: http://discussions.apple.com/thread.jspa?threadID=2122639&start=30&tstart=0

It uses a python script and some renaming to prevent iTunes from opening when applications of your choice are already open:

Open a Terminal and type the following

cd /Applications/iTunes.app/Contents/MacOS
sudo mv iTunes iTunesX 
sudo curl http://www.cs.umd.edu/~dmonner/iTunes -O
sudo chmod uog+x iTunes 

From http://www.cs.umd.edu/~dmonner/iTunes

#!/usr/bin/env python

import sys, os, subprocess

launch = True
blocker = ""

apps = ["Spotify", "Songbird"]

ps = subprocess.Popen("/bin/ps -x", shell=True, stdout=subprocess.PIPE)

for line in ps.stdout.read().split("\n"):
    for app in apps:
        if app in line:
            launch = False
            blocker = app

ps.stdout.close()

if launch :
    os.spawnvp(os.P_WAIT, '/Applications/iTunes.app/Contents/MacOS/iTunesX', sys.argv)
else :
    print "Not launching iTunes while %s is running." % blocker

Add whatever application you need to the list apps = ["Spotify", "Songbird", "your app here"]

Share:
247,288

Related videos on Youtube

Olly
Author by

Olly

Updated on September 17, 2022

Comments

  • Olly
    Olly over 1 year

    In Snow Leopard the Play / Pause media button (on the F8 key) opens up iTunes. How can I disable that? Preferably keeping the old Leopard behaviour, so I can use it to control other media applications (e.g. Spotify).

    • Admin
      Admin over 14 years
      Apple forum thread about the issue: discussions.apple.com/thread.jspa?messageID=10075555 — no solution though. (Even if the page strangely claims "This question is answered")
    • Admin
      Admin over 14 years
      Another unclosed thread on this: forums.macrumors.com/showthread.php?t=757430
    • Admin
      Admin over 14 years
      This one is loaded with good solutions: discussions.apple.com/…
    • Admin
      Admin almost 13 years
      This is FIXED in Lion.
    • Admin
      Admin over 12 years
      @AugustLilleaas It is not fixed in Lion!
    • Admin
      Admin almost 11 years
      Ugh, I can't add an answer due to lack of rep -- but I found a great patch for the rcd (Remote Control Daemon) that fixes this completely -- thebitguru.com/projects/iTunesPatch -- code on github here: github.com/thebitguru/play-button-itunes-patch
    • Admin
      Admin over 10 years
      This is fixed in Mountain Lion and Mavericks.
    • Admin
      Admin almost 10 years
      @Dag Høidahl This is NOT fixed in mountain lion & mavericks. The media keys are bound to the last active media application. Ie. you are using spotify with the keys and it works fine. You pause spotify, play a video in VLC, then close VLC. Now the media keys are still bound to VLC because it's the last active app. However, you have closed VLC so the binding is lost. Pressing the play key now opens itunes again instead of controlling spotify.
    • Admin
      Admin over 9 years
      @Maurice I hadn't noticed that behaviour when closing apps, just that I can control e.g. Spotify without iTunes opening. I'd say the problem is still a little broken, but mostly fixed.
    • Admin
      Admin over 8 years
      @olly – Please consider marking superuser.com/a/827710/491679 the best answer. It was posted much later, but it's seems to be exactly what most users reading this will need.
    • Admin
      Admin about 8 years
      El Captain cd /Applications/iTunes.app/Contents/MacOS; sudo mv iTunes iTunesX; sudo chmod uog+x iTunesX
    • Admin
      Admin almost 7 years
      It's mind boggling how this is still a problem 8 WHOLE YEARS LATER!! This is proof that Apple doesn't actually listen to users. They just force their stuff onto you, like it or not. And each OS update just breaks again all tricks to disable effing iTunes!
    • Admin
      Admin over 6 years
      (I don't have enough rep to write an answer) An easy solution - If you don't use iTunes at all like me, simply right click, disable all permissions for "everyone".
    • Admin
      Admin over 5 years
      Dear visitors from the future: launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
  • Admin
    Admin over 14 years
    I'd hope there was some solution also for those of us who use iTunes (too), and don't want to delete it...
  • Admin
    Admin over 14 years
    Out of all options presented so far, your option 1 seems like an ok work-around; +1 for that
  • Assaf Levy
    Assaf Levy over 14 years
    Indeed, this is a slightly better work-around
  • Assaf Levy
    Assaf Levy over 14 years
    As with superuser.com/questions/31925/…, a very limited number of people can take this advice. Many of us want to use iTunes (too), or need it for e.g. iPhone syncing.
  • Admin
    Admin over 14 years
    It works but it seems to damage the iTunes Code Signing Certificate which is ok but everytime you open up iTunes (on a Mac) you'll be asked if the application is allowed to make outgoing connections.
  • Olly
    Olly over 14 years
    I've accepted this answer as it is the easiest and least problematic of the solutions.
  • Assaf Levy
    Assaf Levy about 14 years
    Just tried this on my Macbook (OS X 10.6.3) with Spotify & iTunes. iTunes did keep opening despite pressing alt/option along with the media keys. :/
  • Assaf Levy
    Assaf Levy about 14 years
    But if you add shift it works that way! See superuser.com/questions/31925/…
  • Assaf Levy
    Assaf Levy about 14 years
    Indeed, you are right, +1. However, this is starting to get a bit unwieldy as I like to have the "standard function keys" option on, i.e. I need to press 4 keys: Fn + Shift + Option + Play :P
  • user16315
    user16315 almost 14 years
    I've done this in the past, but Apple Update likes to overwrite it. This last time I tried making the file system and userimmutable, we'll see if Apple Update respects that flag. I cant really test it until a new update is available, but if anyone else wants to try it: sudo chflags uchg /Applications/iTunes.app/Contents/MacOS/iTunes sudo chflags schg /Applications/iTunes.app/Contents/MacOS/iTunes If you want to disable that (e.g to actually update): sudo chflags nuchg /Applications/iTunes.app/Contents/MacOS/iTunes sudo chflags noschg /Applications/iTunes.app/Contents/MacOS/iTunes
  • August Lilleaas
    August Lilleaas over 13 years
    Upvote this, zomg!
  • garrow
    garrow about 13 years
    I just updated to 10.2.1 and the issue still occurs.
  • Asheesh Yadav
    Asheesh Yadav over 12 years
    Works perfectly in snow leopard. Thanks for the tip!
  • Jari Keinänen
    Jari Keinänen over 12 years
    And runs great on Lion too!
  • Paul Lefebvre
    Paul Lefebvre over 12 years
    This tip also works for controlling Rdio.
  • Admin
    Admin over 12 years
    Creating a new empty playlist works as well. Just make sure this playlist is selected.
  • Pavel Alexeev
    Pavel Alexeev about 12 years
    Binary moved here: nomitsu.com/contents/MMFix.dmg Works great on 10.7.3 Lion!
  • Garen Checkley
    Garen Checkley almost 12 years
    ++ Nice simple workaround. Too bad it isn't more intuitive.
  • MrDaniel
    MrDaniel over 11 years
    This does not appear to work on Lion, iTunes still opens for me, regardless of if Quicktime is open or not.
  • andyface
    andyface over 11 years
    kinda annoying having to use modifier keys, but hey, if it means i don't have to open something else up or keep closing itunes then I'm happy
  • Dag Høidahl
    Dag Høidahl almost 11 years
    In Mountain Lion (at least version 10.8.3), this behaviour seems to be fixed. When Spotify is open, iTunes does not open anymore.
  • Admin
    Admin over 10 years
    Can't remove the iTunes.app out of Applications... it says "“iTunes” can’t be modified or deleted because it’s required by Mac OS X."
  • Fred K
    Fred K over 10 years
    This seems to not work on Mavericks
  • Dag Høidahl
    Dag Høidahl over 10 years
    I haven't needed to use this trick since Mountain Lion. The Play/Pause button does not open iTunes anymore if Spotify is open.
  • fgb
    fgb about 10 years
    Still works in Mavericks!
  • Tango
    Tango over 9 years
    Is it known if this works on Mavericks or Yosemite?
  • Peter Ehrlich
    Peter Ehrlich over 9 years
    Would love a way to now bind this to launch Spotify
  • noetix
    noetix over 9 years
    Works on Yosemite
  • harpermd
    harpermd over 9 years
    I've noticed that I've had to uninstall and re-install it after some updates or when the OS updates, but this script has been a real trooper. Big fan.
  • Paul Wenzel
    Paul Wenzel about 9 years
    This worked for well for me with iTunes 12 and Yosemite.
  • Automatico
    Automatico almost 9 years
    It is now updated, so you actually open the package folder, and run the Play Button iTunes Patch.app, press patch and type your password twice. It even takes a backup which you can restore from. Great stuff!
  • Thilak Rao
    Thilak Rao almost 9 years
    Excellent! Looks like the devs are maintaining the script. I had to go to the Github page and download. Works just fine on Yosemite.
  • Clint Eastwood
    Clint Eastwood almost 9 years
    in Yosemite, iTunes is still being opened. Didn't work for me.
  • bschlueter
    bschlueter over 8 years
    There's a new version of this with a gui, and it works on OS X 10.10. Just download and run the dmg at thebitguru.com/projects/iTunesPatch.
  • Ivangrx
    Ivangrx over 8 years
    This works on El Capitan, but it doesn't forward the play button event to the actively playing application
  • Ivangrx
    Ivangrx over 8 years
    This stopped working for El Capitan.
  • Jeroen
    Jeroen over 8 years
    This is the best solution and works on El Capitan!
  • Tom Harrison Jr
    Tom Harrison Jr over 8 years
    See answer from @bernk from 17-Oct-2014 that has a simple fix that survives new versions of the operating system and is simple and correct.
  • Magne
    Magne about 8 years
    This will completely disable the remote control device (rcd), if I am not mistaken. Which will not allow you to use your mac remote control, if you have that.
  • Jake
    Jake about 8 years
    This is fantastic.
  • inspector g
    inspector g about 8 years
    @w00t I haven't found that to be the case on my machine. Works with OS X 10.11.3, iTunes 12.3.2.
  • ccpizza
    ccpizza almost 8 years
    @w00t: On El Capitan you need to disable SIP before applying the patch: thebitguru.com/projects/iTunesPatch
  • NitroG42
    NitroG42 over 7 years
    It doesn't work anymore on MacOs Sierra... Too bad I liked having a simple command to do that.
  • Deepend
    Deepend over 7 years
    I use MacOs Sierra 10.12.1 and it works. Perhaps you need to be root?
  • Ray
    Ray about 7 years
    Did not work in Sierra. Got following error: /System/Library/LaunchAgents/com.apple.rcd.plist: Could not find specified service
  • Ray
    Ray about 7 years
    @NitroG42 Just realized the unload just removes it from starting on boot time. If you don't want to restart, you can kill it the running rcd process with launchctl stop com.apple.rcd or a direct kill -9 <rcd pid>
  • NitroG42
    NitroG42 about 7 years
    Well it worked now because app like Spotify were updated to comply with the new media key system, but at the time I wrote, nothing was working, and you killing the rc daemon wouldn't change anything. If you are interested in how it works to catch those events in app, look here : github.com/jguice/mac-bt-headset-fix/tree/sierra
  • cregox
    cregox almost 7 years
    is this so different from the second most voted answer here so you had to add an answer rather than simply putting a comment there?
  • cregox
    cregox almost 7 years
    here's a similar fix, if you happen to use google chrome and have it always opened: install google music app. or any chrome extension that will "hijack" the media keys, such as sway or streamkey. only thing is they might bring some problems of their own. now I'm wondering how to fix this once and for all.
  • Fish Monitor
    Fish Monitor almost 7 years
    Can this duplicated answer be hidden and closed?
  • Navin
    Navin over 6 years
    This is just sad :(
  • Navin
    Navin over 6 years
    Works perfectly, even on Sierra :)
  • Cai
    Cai over 6 years
    On Sierra this requires SIP to be disabled.
  • James Douglas
    James Douglas over 6 years
    It works for me on Sierra. Thank you! This is an awesome answer...
  • Peter Jenkins
    Peter Jenkins over 6 years
    On El Capitan this doesn't work: foo:MacOS root# pwd /Applications/iTunes.app/Contents/MacOS foo:MacOS root# mv iTunes iTunes_ mv: rename iTunes to iTunes_: Operation not permitted
  • James Douglas
    James Douglas over 5 years
    This no longer works for me since i upgraded to Mojave.
  • Gordon
    Gordon over 5 years
    This was working for me up until Mojave (I skipped High Sierra). Now even when I have quicktime and amazon music open, iTunes still opens every time.
  • iceburger
    iceburger about 4 years
    Stop Music.app from opening on 10.15.4. However, I still cannot control Amazon Music instead, except when it is in focus, which defeats the purpose.
  • Alex
    Alex about 3 years
    This is a great answer - worked as a charm on Catalina. Thanks!