thebitguru / play-button-itunes-patch

Play Button iTunes Patch
http://www.thebitguru.com/projects/iTunesPatch
Other
644 stars 19 forks source link

doesn't work on mavericks #3

Closed spaghetticode closed 10 years ago

spaghetticode commented 10 years ago

as per title, at least on my machine ;-)

thebitguru commented 10 years ago

What error are you getting? Also, are you on 10.9.0 or 10.9.1?

spaghetticode commented 10 years ago

no error. The patch just has no effect. I’m on 10.9.1

Il giorno 17/gen/2014, alle ore 05:04, Farhan Ahmad notifications@github.com ha scritto:

What error are you getting? Also, are you on 10.9.0 or 10.9.1?

— Reply to this email directly or view it on GitHub.

thebitguru commented 10 years ago

Can you try running killall rcd in a terminal window or restarting? It could be that rcd didn't restart for some reason.

quicksnap commented 10 years ago

I've applied the patch "successfully" on Mavericks as well, with no luck. Media button triggers iTunes, even after killall rcd

Edit: Also specifically killed the rcd PID to make sure.

thebitguru commented 10 years ago

@quicksnap I see. Can you please share the output from the terminal window?

quicksnap commented 10 years ago

Sure thing. Thanks!

Everything is ready. Would you like to create a backup and apply the patch? (y/N) y
Patching...
 + Killed any running processes.
 + Backed up the existing file as rcd_backup_0.8.2_201401181550.45
 + Patching...
    Successfully patched the file (found 1 instances at 30748).
 + Regenerating the code signature...
/System/Library/CoreServices/rcd.app/Contents/MacOS/rcd: replacing existing signature
 + Successfully patched the existing file.

Finished patching.  To verify:
 1. If iTunes is already running then quit it first.
 2. Press the play button on your keyboard.
 3. If iTunes did not start then the patch was applied successfully.
 4. Enjoy.

Run this script again if you would like to restore the original functionality.
thebitguru commented 10 years ago

Hmm... I see. killall is failing to stop the process. Can you try the following in a new terminal?

  1. pgrep rcd
  2. kill -9 <process ID returned from the above command>
thebitguru commented 10 years ago

Sorry, a simpler command would be killall -KILL rcd :) If this works then I will update the script to do this instead.

quicksnap commented 10 years ago

You have just made my life immensely better! Thank you! (It works)

I figured rcd was respawning really quickly, I didn't think to check if the PID changed =)

So awful that this script even has to exist; thank you so much for making it!

quicksnap commented 10 years ago

Also, not sure if this caused the issue, but I didn't run the command with sudo--, it asked for my password, and checked for root uid, so figured it was good to go. Maybe that's why it couldn't kill?

Should it change to this? https://github.com/quicksnap/play-button-itunes-patch/commit/c0bb9b69370db4894168c27dd1a43e8d97260ec2#diff-0

thebitguru commented 10 years ago

The script ensures that it is run as root, otherwise it won't be able to patch the rcd binary so I don't think it is an issue with root permissions. By default killall sends the SIGTERM signal, which, I am guessing, is probably something that rcd might have stopped listening to in the newer versions (I know the killall used to work before).

I will update the patch with the -KILL argument. Thanks for helping troubleshoot this!

thebitguru commented 10 years ago

Updated and committed. The updated zip file is available on the project page http://www.thebitguru.com/projects/iTunesPatch