I wrote a patch/utility that disables OS X's default functionality of starting iTunes when the play button is pressed. This utility basically modifies the Remote Control Daemon (rcd) and comments out the Apple Script command to start iTunes. This has worked fine until 10.7, but with 10.8 rcd now has code signature. The patch now causes Exception Type: EXC_CRASH (Code Signature Invalid) after the executable is patched.

Obviously, the code signature checking is working as designed, but I was wondering if anyone has any ideas on what options I might have. Is there a legit way to turn off this check on a single executable? I have tried turning of GateKeeper, but that, understandably, didn't do it.

Any other suggestions for disabling the play button?

  • 4
    for signing you need to do this: sudo codesign -f -s - /System/Library/CoreServices/rcd.app/Contents/MacOS/rcd
    – user48986
    May 8, 2013 at 22:17
  • Thanks user48986, that did it. I have updated the utility.
    – thebitguru
    May 11, 2013 at 5:45
  • 1
    I have updated the utility, but can you (user48986) "answer" this question so you get the credit :) Apparently I can't mark a comment as an answer.
    – thebitguru
    May 11, 2013 at 5:51
  • Hilariously, I came to this answer, while solving the exact same problem in the exact same way, not realizing somebody (you) had had the same idea and already done the same thing. Thanks, both to user48986, and @thebitguru. :P Jul 26, 2016 at 16:06

2 Answers 2


I got the patch to work after running sudo spctl --master-disable. I don't know if there is any way to use spctl to target only rcd though.

Replacing the code signature with an ad-hoc identity with sudo codesign -f -s - /System/Library/CoreServices/rcd.app/ didn't seem to work. Edit: but as mentioned by user48986, it works if you specify the path to the executable, like sudo codesign -f -s - /System/Library/CoreServices/rcd.app/Contents/MacOS/rcd.

  • Thanks! I think maybe the only way is to use rcd from an older version of OS X :|
    – thebitguru
    Sep 20, 2012 at 1:24

To fix the signature of for example MirrorPro:

sudo codesign -f -s - /Applications/MirrorPro.app/Contents/MacOS/MirrorPro
/Applications/MirrorPro.app/Contents/MacOS/MirrorPro: replacing existing signature

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .