Free Your Mac’s Media Keys From iTunes’ Grasp

Free Your Mac’s Media Keys From iTunes’ Grasp

Nowadays, Mac keyboards have built-in media keys which can be quite handy — unless you want to use them with something other than iTunes. If you fall into that camp, here’s how to disassociate those keys with iTunes once and for all.

The problem is that, while some other media players have support for the media keys, Snow Leopard always links them with iTunes, causing iTunes to launch when you hit the play/pause button (Leopard does not have this issue). There are a number of ways to fix this. You can delete iTunes completely, including any copies on your backup disk, which is fine if you don’t use it (and if you change your mind, it’s easily reinstallable from Apple’s website). If you need to keep iTunes as a safety net, this won’t work though. Another option is keeping iTunes (in Music Store mode) or an empty Quicktime open in the background, but this is annoying and can be heavy on system resources. Thus, if you’re comfortable with it, the best method is to actually dig into the system files themselves.

You’ll need to use Terminal and Applescript Editor to pull this off, but it shouldn’t be too difficult. Open up a terminal window and type (or better yet, copy and paste) these three lines of code separately, hitting enter after each line and entering your password when prompted (note that it won’t show you your password as you type, but it is accepting the keystrokes).

cd /Applications/

sudo mv iTunes iTunesX

sudo chmod uog+x iTunes

This renames a file within the iTunes app so it can’t launch. Of course, if you’re using this method, it means you still want to keep iTunes handy (perhaps your media player of choice draws from your iTunes Library), so you’ll have to make a quick script that will launch iTunes. Open up Applescript Editor and just copy and paste this code:

tell application “Finder”


set name of document file “iTunesX” of folder “MacOS” of folder “Contents” of application file “” of folder “Applications” of startup disk to “iTunes”

end try

tell application “iTunes” to activate

set name of document file “iTunes” of folder “MacOS” of folder “Contents” of application file “” of folder “Applications” of startup disk to “iTunesX”

end tell

Go to File and Save the script in your Applications folder (or wherever you want). Make sure the file format is “Application” so it is easily launchable, too. Then, when you want to open iTunes, just launch this tweaked application instead — iTunes will open right up.

Note that the original instructions at MakeUseOf used a different version of the 3rd Terminal command: sudo chmod uog+x iTunes instead of using iTunesX at the end. When I tested it, this line kept giving me an error saying that it couldn’t find the system file “iTunes”, which makes sense, because we had just renamed it to iTunesX. With my small change it worked like a charm for me; in fact, I tested the media keys with Songbird 1.4 and the Apple Media Key Support add-on. Note that the iTunes will do a quick bounce in the dock whenever you pressed play/pause (or, if iTunes isn’t in your dock, you’ll see your dock shift a little bit), though it didn’t open or interfere with the keys’ functionality. If you’ve got your own preferred method of working around this Snow Leopard “feature”, let us know in the comments!

Stop iTunes from Interfering with the Mac Media Keys [MakeUseOf]


  • 1. You didn’t change the Terminal script that you explain in the end, so iTunesX is still iTunes in your quote

    2. Most importantly, when I Copy the Applescript text, and tried to save or run it, I got the error “Expected expression, property or key form, etc. but found unknown token.”. After some hassling I found out that pasting the commands results in “Italian” double brackets (”) instead of the correct, “, found on the right of the ;/: key.

    Other than that, thanks a lot! It really bugged me since i use Cog as my default player. (:

  • This did not work at all for me. Even after attempting to follow the first comments. Now I cannot open iTunes at all. Is there a way to reverse the terminal command?

  • Thanks Whitson. Nice way to simply SWITCH OFF fat iTunes. I use tiny Vox – perfect –
    B.t.w if only to disable iTunes then just
    “cd /Applications/”
    “sudo mv iTunes iTunesX”.

    Amber, to undo use
    “sudo mv iTunesX iTunes”.

  • I did everything you said, except that

    (1) I changed “iTunes” to “iTunesX” in the third line of your terminal script, as Amberclock suggested.

    (2) I changed the angled quotation marks to ASCII ones.

    However, running my script “” only yields the following:

    error “An error of type -10810 has occurred.” number -10810

    What should I do?

Log in to comment on this story!