Play Button iTunes Patch

Published Sunday November 21, 2010

Overview

2013-05-11: I am thinking that the required codesign utility is part of xcode. Investigating…

2013-05-11: This now works in OS X Moutain Lion.

This is a patch for removing the default OS X behavior of always starting iTunes when the play button on the keyboard is pressed. This feature can be useful for a lot of users, but it can also be annoying if you are using VLC or other similar programs that support the media keys.

The Patch.command script will patch the Remote Control Daemon to prevent it from starting iTunes whenever you press the play button on the keyboard or an external remote control. This will only prevent iTunes from starting, all other functions (like play/pause while iTunes is running) will continue to work as before.

Lastly, this program will backup the original file in case if you would like to restore the original functionality.

You can find the source code on github.

Updates

2013-05-11 farhan: Updated to 0.8.2. Added step to self-sign the modified binary. This should prevent rcd from crashing on Mountain Lion. Thanks to user48986 at AskDifferent .

2011-08-18 farhan: Updated to 0.8 to account for spaces in the directory name (thanks to Michael Winstock for submitting the patch!).

2011-07-26 farhan: If you are upgrading to OS X Lion with a previously patched file then please note that the OS X Lion upgrade process replaces the patched file with an updated version so you will have to re-run this to patch the latest file.

Download

Play Button iTunes Patch 0.8.2

After downloading double click on Patch.command and follow the prompt.

License

Copyright (C) 2010 Farhan Ahmad.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

Comments

11:30 p.m. Thursday Dec. 2, 2010 (about 1 week, 3 days after publishing)
Thanks Pontus
For fixing this awful feature! This is one of the reasons I hate apple..
11:47 p.m. Friday Dec. 3, 2010 (about 1 week, 5 days after publishing)
thank you mac user
Thank you for this quick and easy fix.
8:32 a.m. Wednesday Dec. 8, 2010 (about 2 weeks, 2 days after publishing)
Thanks! erik
Thanks for saving me a bunch of work! Works fine here.
5:23 p.m. Thursday Dec. 9, 2010 (about 2 weeks, 3 days after publishing)
Will other remote control functions be disabled? bunny
And what is the purpose of the remote control function anyway?
1:22 a.m. Friday Dec. 10, 2010 (about 2 weeks, 4 days after publishing)
RE: Will other remote control functions be disabled? farhan
This patch only disables the launching of iTunes. Everything else should work as usual.

Based on what I have seen so far I believe remote control daemon (rcd) controls the launching of programs and implements a lot of the other multimedia related functionality when using remote and other multi-media keys on the keyboard. I have seen that without rcd iTunes wouldn't respond to any of the multimedia keys (rewind/forward), but I haven't confirmed that.
10:07 p.m. Wednesday Dec. 15, 2010 (about 3 weeks, 2 days after publishing)
thanks khan
thanks
7:08 p.m. Friday Dec. 17, 2010 (about 3 weeks, 4 days after publishing)
You Rock! Jerome
Thanks Dude you rock!
3:26 p.m. Sunday Jan. 9, 2011 (about 1 month, 2 weeks after publishing)
Stopping the play button hijacking is nice... Lance
Thank you for fixing the daemon to stop pulling up iTunes! Do you know how to do the same for the rewind and fast forward keys?
9:07 a.m. Thursday Jan. 20, 2011 (about 1 month, 4 weeks after publishing)
RE: Stopping the play button hijacking is nice... farhan
For anyone wondering, Lance and I exchanged a few emails and found that the cause in his case was a third party program called TunesArt. Some changes in that program fixed this issue.
7:42 p.m. Thursday Feb. 3, 2011 (about 2 months, 1 week after publishing)
Thanks dimitri
Great patch. Thanks man!
12:52 p.m. Thursday Feb. 10, 2011 (about 2 months, 2 weeks after publishing)
Thanks! Thankful User
This is SO useful. Thanks a lot for that!
8:28 a.m. Thursday Feb. 24, 2011 (about 3 months after publishing)
Empty Terminal window Jannes
Hey,

Every time I try to run the patch I get a empty Terminal window..
Anybody knows what to do?

Thanks!
11:07 a.m. Thursday Feb. 24, 2011 (about 3 months after publishing)
RE: Empty Terminal window farhan
Jannes and I had a conversation through email. Before we could figure out the actual cause, a restart fixed the issue.
1:26 p.m. Sunday Feb. 27, 2011 (about 3 months, 1 week after publishing)
Many thanks Karan
This is something Apple should have done, many thanks for releasing this patch and fixing things for everyone!
5:54 a.m. Friday Apr. 22, 2011 (about 5 months after publishing)
:) Aki
Thanks for this one!
2:21 a.m. Wednesday May. 18, 2011 (about 5 months, 3 weeks after publishing)
Nice thing Alfonso
Perfect man! That is it, works fine for me =)
8:10 a.m. Wednesday Aug. 17, 2011 (about 8 months, 4 weeks after publishing)
Works on OS X Lion as well Lenart
I can confirm this patch working with Mac OS X Lion. Thanks a lot mate!
9:37 a.m. Thursday Aug. 18, 2011 (about 8 months, 4 weeks after publishing)
RE: Works on OS X Lion as well farhan
Great, thanks for letting me know!
7:05 a.m. Thursday Aug. 18, 2011 (about 8 months, 4 weeks after publishing)
Works! J2
Indeed, works nicely on OSX Lion. Cheers!
9:37 a.m. Thursday Aug. 18, 2011 (about 8 months, 4 weeks after publishing)
RE: Works! farhan
Great, thanks for letting me know!
1:36 a.m. Thursday Nov. 10, 2011 (about 11 months, 3 weeks after publishing)
Thanks!! Jockele
Exactly what I was looking for!
4:19 p.m. Wednesday Nov. 23, 2011 (about 1 year after publishing)
Thanks! f.
Great, thank you for this small thing. It works well on LION (10.7.2)! Thanks!!!
7:22 p.m. Thursday Nov. 24, 2011 (about 1 year after publishing)
RE: Thanks! farhan
I am glad that this is useful. Enjoy!
9:58 a.m. Monday Dec. 5, 2011 (about 1 year after publishing)
This is useful and it works perfectly. dieTunes
Installed and tested under Mac OS X Snow Leopard 10.6.8 on an Intel-based iMac. The keyboard's Play/Pause key and the remote control's Play/Pause button do not launch iTunes anymore. Aside from this, the keyboard media keys and remote control buttons work normally. Conclusion is... this smart little patch works flawlessly. It does exactly what it is supposed to do. Kudos to the author of this script. Note: I haven't tried the unpatching process, I like my RCD patched!
11:06 p.m. Thursday Dec. 8, 2011 (about 1 year after publishing)
Great Fix Eric
Thanks so much!!
10:07 a.m. Monday Dec. 5, 2011 (about 1 year after publishing)
RE: This is useful and it works perfectly. farhan
I am glad that this worked for you. Enjoy the media keys! :)
11:05 a.m. Thursday Feb. 9, 2012 (about 1 year, 2 months after publishing)
:( zeke
hey mate. doesn't work anymore with new lion update. :(
11:08 a.m. Thursday Feb. 9, 2012 (about 1 year, 2 months after publishing)
RE: :( farhan
Are you sure? I am running Lion and it has been working fine. Try restarting, backing out the patch by running it again and then re-applying.
1:02 a.m. Friday Feb. 10, 2012 (about 1 year, 2 months after publishing)
RE: RE: :( zeke
why am i always missing the easiest way?! thanks. works fine now!! :D
8:17 a.m. Tuesday Feb. 14, 2012 (about 1 year, 2 months after publishing)
awesome emz
thank you for this wonderful patch! =)
12:34 p.m. Monday Feb. 20, 2012 (about 1 year, 3 months after publishing)
Thanks! Edgar
Such a simple thing should've been the default behavior. Luckily there's you to fix it :)
11:31 p.m. Monday Feb. 20, 2012 (about 1 year, 3 months after publishing)
RE: Thanks! farhan
Yeah, at the least it should have been an option in the OS :) I am glad that you found this useful as well. Enjoy!
6:39 p.m. Wednesday Mar. 14, 2012 (about 1 year, 3 months after publishing)
Fantasmagoria Distance Left
Thanks, you saved me hours of scripting. Kudos!
10:34 p.m. Wednesday Mar. 14, 2012 (about 1 year, 3 months after publishing)
RE: Fantasmagoria farhan
I am glad that this saved you time. Enjoy! :)
12:11 a.m. Thursday Apr. 5, 2012 (about 1 year, 4 months after publishing)
Replacing iTunes Matt
Thank you very much for this useful script.
Just one quick question. Would it be possible to add a feature to
the script to adjust the path of the launched app when pressing the play/pause button? (for e.g. Sonora, Pulsar, VLC)
7:46 p.m. Monday Apr. 9, 2012 (about 1 year, 4 months after publishing)
Whew! Melanie
I used vim in binary mode to disabuse rcd of the notion to start iTunes. I hate iTunes, there isn't a worse player in all of history. All I use it for is to buy from the store. Now it's just that - a normal app! Yeah!
6:34 p.m. Sunday Apr. 29, 2012 (about 1 year, 5 months after publishing)
Nobel Prize Morsicatio
I'm nominating you. Great work.
7:41 p.m. Monday Apr. 30, 2012 (about 1 year, 5 months after publishing)
RE: Nobel Prize farhan
Lol, thanks for the compliment! :) Enjoy.
6:24 a.m. Monday May. 28, 2012 (about 1 year, 6 months after publishing)
Wow! Eduardo Patricio
I love you!
11:05 a.m. Wednesday Jun. 6, 2012 (about 1 year, 6 months after publishing)
Apple remote changes volume with up/down Björn Nilsson
Thanks for this wonderful patch!

Sometimes when my Mac (Lion 10.7.4) comes back from sleep, the up/down keys on my apple remote changes the volume. I wonder if this patch could disable that too?

The strange thing is after a reboot, the remote wont change the volume anymore, but its not ideal to have to reboot to solve this.

The up/down volume keys interfere with my navigation in the media player app I use (XBMC)
3:17 a.m. Monday Jun. 11, 2012 (about 1 year, 6 months after publishing)
RE: Apple remote changes volume with up/down farhan
Hi Bjorn,

If the mapping changes after coming back from sleep then my guess would be that a third party program is interfering. Have you reviewed your third party programs to see if they might have a clue?

Good luck
4:43 p.m. Sunday Jun. 10, 2012 (about 1 year, 6 months after publishing)
Thanks Colm
Cheers for the patch.
6:50 a.m. Saturday Jun. 23, 2012 (about 1 year, 7 months after publishing)
Mountain Lion Tobbs
Any news for Mountain Lion? Been using this on Lion, and while it sort of works on Mountain Lion i keep getting "rcd quit unexpectedly" message repeatedly.
9:56 p.m. Wednesday Jul. 25, 2012 (about 1 year, 8 months after publishing)
thank you chris
was really great finding your patch. i found i can launch vlc by changing the "--" line in your python script to:
map[found_at+21:found_at+37] = "org.videolan.vlc"
2:53 p.m. Thursday Jul. 26, 2012 (about 1 year, 8 months after publishing)
thanks! streem
dude!!! you are a god! just implement mountain lion compatibility and you are my hero! Rocks on 10.7.4 anyway! thank you so much!
3:25 p.m. Monday Aug. 6, 2012 (about 1 year, 8 months after publishing)
... streem
pleaaaase update fast to let this work with mountain lion! :)
8:33 a.m. Saturday Aug. 18, 2012 (about 1 year, 9 months after publishing)
temporary fix streem
kill the "itunes helper" process and delete it from autostart list (system settings -> user and groups)! restart your mac, and use play button without starting itunes.
11:46 p.m. Saturday Aug. 18, 2012 (about 1 year, 9 months after publishing)
fix pichr
http://www.driestone.net/2012/08/10/stopping-the-media-keys-from-launching-itunes/
1:01 p.m. Sunday Aug. 19, 2012 (about 1 year, 9 months after publishing)
RE: fix farhan
Thanks. I am following up with the author because that's exactly what this script does, but the error that I get after 10.8 is "EXC_CRASH (Code Signature Invalid)"
6:58 a.m. Tuesday Aug. 21, 2012 (about 1 year, 9 months after publishing)
works streem
thanks for your post pichr. works fine for me.
4:32 a.m. Thursday Aug. 30, 2012 (about 1 year, 9 months after publishing)
works but... Nico Prat
Works great (Mountain Lion), but seems like I have to redo the procedure after each system boot (restore old rcd, then apply again the patch).

Thanks anyway !
6:39 a.m. Saturday Sep. 15, 2012 (about 1 year, 9 months after publishing)
Just got kicked out of the Frontrow Macman
Apple cinema for Media Centres is over, my family are devastated.
Made a switch over to XBMC with Addons.

Thanks for your hard work.


Marty
11:47 p.m. Friday Nov. 23, 2012 (about 2 years after publishing)
Play Button iTunes Patch, undo Steve
Could you please guide me in undoing the patch. It will not stay active after the Mac sleeps and I get "rcd quit" error, so I want to return to the original condition before the patch. I am willing to start up iTunes and leave it running in the background while I use XBMC to watch or listen to my audio/video programs. Nice idea if it would stay locked in. But I am disappointed that every time I sleep the Mac I have to restart it to clear the error code. Thanx for the help.

Steve
6:18 p.m. Saturday Nov. 24, 2012 (about 2 years after publishing)
RE: Play Button iTunes Patch, undo farhan
Hi Steve,

Just re-run the patch and it should guide you through undoing it.
6:31 p.m. Tuesday Dec. 18, 2012 (about 2 years after publishing)
play button itunes h
solution:
http://www.driestone.net/2012/08/10/stopping-the-media-keys-from-launching-itunes/
7:07 p.m. Tuesday Dec. 18, 2012 (about 2 years after publishing)
RE: play button itunes farhan
What version of MacOS are you using? I am surprised that this would work, but I'll give it a try.
12:21 p.m. Thursday Apr. 18, 2013 (about 2 years, 4 months after publishing)
Useful and easy! Cristina
Thank you very much for sharing this!
Congratulations for such a great job!
11:39 a.m. Saturday May. 11, 2013 (about 2 years, 5 months after publishing)
Didn´t work on mountain lion daniel
When i loged in again i constantly got messages sayin that rcd or something had been force quited
11:58 a.m. Saturday May. 11, 2013 (about 2 years, 5 months after publishing)
RE: Didn´t work on mountain lion farhan
I'll email you and we can troubleshoot there.
9:42 p.m. Monday May. 13, 2013 (about 2 years, 5 months after publishing)
RE: Didn´t work on mountain lion farhan
I have created an issue. Please follow the instructions at the following URL.

https://github.com/thebitguru/play-button-itunes-patch/issues/1
Add new comment