Apple remote starts both XBMC and iTunes after 10.7.2 update
#16
Reply
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!!!
Reply
7:22 p.m. Thursday Nov. 24, 2011 (about 1 year after publishing)
RE: Thanks! — farhan
I am glad that this is useful. Enjoy!
Reply
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!
Reply
11:06 p.m. Thursday Dec. 8, 2011 (about 1 year after publishing)
Great Fix — Eric
Thanks so much!!
Reply
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! Smile



Play Button iTunes Patch

Published Sunday November 21, 2010

Overview

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.

Updates

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.1

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

License

Copyright © 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.

http://www.thebitguru.com/site_media/upl..._0.8.1.zip

http://www.thebitguru.com/projects/iTunesPatch#375
MBP late 2009 - TimeCapsule 2TB - Harmony One+ - Readynas NV+ 8TB RAID5 - Mac Mini late 2009 with 10.9.0 and VDA - Panasonic TX-PG420ES -
Reply
#17
@idioteque, thanks, I forgot all about Farhan Ahmad's iTunesPatch.
Reply
#18
I got one solution to this.
Installed SleepWatcher 2.2.
It makes it possible to automatically run a script at wakeup. The script reloads XBMCHelper, and it makes XBMC get the focus again.
Reply
#19
Torroa, great find, that looks like a decent workaround.

Can you share your XBMCHelper relaunch script? I was unable to figure out what parameters it needs to be launched with.
Reply
#20
bniswe Wrote:Torroa, great find, that looks like a decent workaround.

Can you share your XBMCHelper relaunch script? I was unable to figure out what parameters it needs to be launched with.


Here is what I did:

1. Extracted the tar file onto the desktop.

2. Open Terminal and:

sudo mkdir -p /usr/local/sbin /usr/local/share/man/man8

sudo cp ~/Desktop/sleepwatcher_2.2/sleepwatcher /usr/local/sbin

sudo cp ~/Desktop/sleepwatcher_2.2/sleepwatcher.8 /usr/local/share/man/man8

sudo cp ~/Desktop/sleepwatcher_2.2/config/de.bernhard-baehr.sleepwatcher-20compatibility.plist /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist

sudo cp ~/Desktop/sleepwatcher_2.2/config/rc.* /etc

sudo launchctl load /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist


3. After installing SleepWatcher, create a .wakeup file in the home directory, using nano or vi in Terminal (nano ~/.wakeup) that looks like this:

#!/bin/bash

#
# Kill off the XBMCHelper process.
#
killall -9 XBMCHelper

#
# Restart XBMCHelper.
#
((//Applications/XBMC.app/Contents/Resources/XBMC/tools/darwin/runtime/XBMCHelper -x & ) & )


4. Not sure if it is needed to make this file executable, but I did a: chmod +x ~/.wakeup
Reply
#21
I finally installed Candelair and it takes care of the problem, simple fix. After sleeping, the remote continues to respond as expected in XBMC and nowhere else.
Dead-thread Necromancer!

Mac Mini (mid-2011) • 2.3GHz Intel Core i5 • 8Gb RAM • OS X 10.9.5 • TVMC 14.2
Raspberry Pi 2 • OpenELEC 6.0
Reply
#22
I can not beleive that this has not been fixed in Eden Final.

Are there any plans to fix this bug?
Reply
#23
(2012-03-25, 21:22)unsynaps Wrote: I can not beleive that this has not been fixed in Eden Final.

Are there any plans to fix this bug?

It's not really something under our control. The IR sensor's driver is in the OS, not in XBMC. We can do some things to try to grab it from other stuff, but there's only so much we can do.
Reply
#24
That's why I will never update my XBMC Mini to Lion. SL much more stable with XBMC
Reply
#25
(2012-03-27, 00:34)N.O.W.A.L.L Wrote: That's why I will never update my XBMC Mini to Lion. SL much more stable with XBMC
Wish I could do that. Can not as I have one of the new new (no optical drive) mini's. Can't install SL on them.

SleepWatcher is a partial fix. For me the OS takes back the remote when the screen saver activates too. Even when XBMC is running.
Reply
#26
I created a workaround based on someone else's solution, then I made it convenient. I wrapped a shell script in AppleScript and drag it to the dock next to XBMC. I wanted to make it as simple as possible, since the Mac Mini replaced our cable box, but my wife demands that it work and can be made to work without significant effort (I'm blessed with a s/o who is beautiful AND smart). Whether XBMC is running or not, we just click the script (bundle app) and it kills XBMC, the helper, then relaunches XBMC with the remote working as it should.

The code:
Quote:tell application "XBMC 11.0 Eden Beta 3" to quit
delay 5
do shell script "killall XBMCHelper"
delay 5
tell application "XBMC 11.0 Eden Beta 3" to activate

If anyone finds they have a better way or an alteration to this script, I think we would all be appreciative.

(the AppleScript Editor is in the Applications/Utilities folder for those new to AS, which since 10.6 is also where you enable the AS drop-down menu)
Dead-thread Necromancer!

Mac Mini (mid-2011) • 2.3GHz Intel Core i5 • 8Gb RAM • OS X 10.9.5 • TVMC 14.2
Raspberry Pi 2 • OpenELEC 6.0
Reply
#27
(2012-03-31, 04:17)sprale Wrote: I created a workaround based on someone else's solution, then I made it convenient. I wrapped a shell script in AppleScript and drag it to the dock next to XBMC. I wanted to make it as simple as possible, since the Mac Mini replaced our cable box, but my wife demands that it work and can be made to work without significant effort (I'm blessed with a s/o who is beautiful AND smart). Whether XBMC is running or not, we just click the script (bundle app) and it kills XBMC, the helper, then relaunches XBMC with the remote working as it should.

The code:
Quote:tell application "XBMC 11.0 Eden Beta 3" to quit
delay 5
do shell script "killall XBMCHelper"
delay 5
tell application "XBMC 11.0 Eden Beta 3" to activate

If anyone finds they have a better way or an alteration to this script, I think we would all be appreciative.

(the AppleScript Editor is in the Applications/Utilities folder for those new to AS, which since 10.6 is also where you enable the AS drop-down menu)

Didn´t you just tell Candelair fixed the problem?
Your solution is fine if you are using a keyboard or mouse. No mater how smart (or good looking) the person is, it is probably not as practical when controlling your XBMC solely with a remote.

Disable the os X screen saver, If you must have one, use dim- or black screen, install a script telling the XBMCHelper to restart when the Mac resumes from standby, and forget about it.

The beta versions of Eden sometimes crashes, especially when resuming from standby. Enable the function to start XBMC with a remote, and disable the os X error popup, and you should be just fine.

Code:
defaults write com.apple.CrashReporter DialogType server
Reply
#28
(2012-03-31, 12:57)Torroa Wrote:
(2012-03-31, 04:17)sprale Wrote: I created a workaround based on someone else's solution, then I made it convenient. I wrapped a shell script in AppleScript and drag it to the dock next to XBMC. I wanted to make it as simple as possible, since the Mac Mini replaced our cable box, but my wife demands that it work and can be made to work without significant effort (I'm blessed with a s/o who is beautiful AND smart). Whether XBMC is running or not, we just click the script (bundle app) and it kills XBMC, the helper, then relaunches XBMC with the remote working as it should.

The code:
Quote:tell application "XBMC 11.0 Eden Beta 3" to quit
delay 5
do shell script "killall XBMCHelper"
delay 5
tell application "XBMC 11.0 Eden Beta 3" to activate

If anyone finds they have a better way or an alteration to this script, I think we would all be appreciative.

(the AppleScript Editor is in the Applications/Utilities folder for those new to AS, which since 10.6 is also where you enable the AS drop-down menu)

Didn´t you just tell Candelair fixed the problem?
Your solution is fine if you are using a keyboard or mouse. No mater how smart (or good looking) the person is, it is probably not as practical when controlling your XBMC solely with a remote.

Disable the os X screen saver, If you must have one, use dim- or black screen, install a script telling the XBMCHelper to restart when the Mac resumes from standby, and forget about it.

The beta versions of Eden sometimes crashes, especially when resuming from standby. Enable the function to start XBMC with a remote, and disable the os X error popup, and you should be just fine.

Code:
defaults write com.apple.CrashReporter DialogType server

I am using the keyboard, mouse, and remote in combination, and Candelair didn't fix the problem permanently, which is why I have the script to do the occasional (less than a couple times a week at worst). If your suggestions work for you, great, but it doesn't work in my circumstances. I was sure there would be a few others in the same boat as myself, which is why I shared my solution.
Dead-thread Necromancer!

Mac Mini (mid-2011) • 2.3GHz Intel Core i5 • 8Gb RAM • OS X 10.9.5 • TVMC 14.2
Raspberry Pi 2 • OpenELEC 6.0
Reply
#29
Great that you shared your solution, its useful for me and I am sure many others.

I have been trying to find the time to TRY and fix this properly, by modifing the XBMCHelper source code.

Im not very familiar with XBMC code base, but
It should be possible to make the app respond to a OS X wakeup and redo the same remote initialization as when the helper starts.

Reply
#30
For anyone having this problem and finding this thread:

As winestock pointed out here:
http://forum.xbmc.org/showthread.php?tid=131691

Using this solves the issue completely:
http://www.thebitguru.com/projects/iTunesPatch

It both prevents iTunes from starting aswell as preventing changing the volume with up down on the remote
Reply

Logout Mark Read Team Forum Stats Members Help
Apple remote starts both XBMC and iTunes after 10.7.2 update0