Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
2  
for signing you need to do this: sudo codesign -f -s - /System/Library/CoreServices/rcd.app/Contents/MacOS/rcd –  user48986 May 8 '13 at 22:17
    
Thanks user48986, that did it. I have updated the utility. –  thebitguru May 11 '13 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 '13 at 5:51

1 Answer 1

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.

share|improve this answer
    
Thanks! I think maybe the only way is to use rcd from an older version of OS X :| –  thebitguru Sep 20 '12 at 1:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.