[MAC] Problem calling System.Exec from keymap.xml
#1
Here is the situation, I want to call System.Exec from the ~/Libary/Application Support/XBMC/userdata/keymaps/keymap.xml to execute a shell script. It does not look like it the shell script is getting executed from keymap.xml.

I can execute the shell script from the terminal and it works fine. I also setup the XBMC program Lanucher add-on to execute the shell script, no problem executing the shell script.

I know when the shell script gets executed as I placed the following at the top of the shell script:
Code:
echo Enter >>~/Desktop/a.txt

When I execute the shell script from the terminal or XBMC program Launcher add-on the a.txt file is written to. But when I attempt to execute the shell script from the keymap.xml a.txt is not written to.

I am doing something incorrectly but I can't seem to see it.

OSX Version 10.6.6
Platform 2008 24" 3.06GHz iMac with 4GB RAM
Install Method dmg
SVN Revision 35648
Skin Transparency!

~/Libary/Application Support/XBMC/userdata/keymaps/keymap.xml
Code:
<FullscreenVideo>
    <joystick name="AppleRemote">
      <button id="1">System.Exec("/Users/mwinestock/Library/Application Support/XBMC/scripts/change_volume.sh" 1)</button>
      <button id="2">System.Exec("/Users/mwinestock/Library/Application Support/XBMC/scripts/change_volume.sh" -1)</button>
      <button id="3">StepBack</button>
      <button id="4">StepForward</button>
      <button id="5">Pause</button>
      <button id="6">Stop</button>
      <button id="7">OSD</button>
      <button id="8">Fullscreen</button>
      <button id="9">Rewind</button>
      <button id="10">FastForward</button>
    </joystick>
  </FullscreenVideo>
Reply
#2
I read instances, on this forum, where users have successfully gotten this to work. I was hoping that someone could shed some light on why this might not be working for me. I have enabled the debug log (level 3) but I did not see anything in the log that would indicate why the System.Exec was failing.

OSX Version 10.6.6
Platform 2008 24" 3.06GHz iMac with 4GB RAM
Install Method dmg
SVN Revision 35648
Skin Transparency!
Reply
#3
I tried something else, I went ahead an tried the System.Exec directly in /Applications/XBMC.app/Contents/Resources/XBMC/system/keymaps/joystick.AppleRemote.xml.

I changed this:
Code:
<FullscreenVideo>
    <joystick name="AppleRemote">
      <button id="1">VolumeUp</button>
      <button id="2">VolumeDown</button>
      <button id="3">StepBack</button>
      <button id="4">StepForward</button>
      <button id="5">Pause</button>
      <button id="6">Stop</button>
      <button id="7">OSD</button>
      <button id="8">Fullscreen</button>
      <button id="9">Rewind</button>
      <button id="10">FastForward</button>
    </joystick>
  </FullscreenVideo>

To this:
Code:
<FullscreenVideo>
    <joystick name="AppleRemote">
      <button id="1">System.Exec("/Users/mwinestock/Library/Application Support/XBMC/scripts/change_volume.sh" "1")</button>
      <button id="2">VolumeDown</button>
      <button id="3">StepBack</button>
      <button id="4">StepForward</button>
      <button id="5">Pause</button>
      <button id="6">Stop</button>
      <button id="7">OSD</button>
      <button id="8">Fullscreen</button>
      <button id="9">Rewind</button>
      <button id="10">FastForward</button>
    </joystick>
  </FullscreenVideo>

Still could not get the System.Exec to execute my command. Is this a possible bug in XBMC? Any help would be appreciated. Maybe a XBMC developer could chime in here.

OSX Version 10.6.6
Platform 2008 24" 3.06GHz iMac with 4GB RAM
Install Method dmg
SVN Revision 35648
Skin Transparency!
Reply
#4
This is the XBMC.log. If someone could look it over and let me know if there is anything that stands out I would appreciate it.

OSX Version 10.6.6
Platform 2008 24" 3.06GHz iMac with 4GB RAM
Install Method dmg
SVN Revision 35648
Skin Transparency!
Reply
#5
It appears that the problem was that userdata/keymaps/keymap.xml has been depreciated. By changing the filename from keymap.xml to keyboard.xml in userdata/keymaps I am now able to execute the System.Exec built-in call.

Bug Report: http://trac.xbmc.org/ticket/11154
Reply

Logout Mark Read Team Forum Stats Members Help
[MAC] Problem calling System.Exec from keymap.xml0