2011-01-17, 16:02
Temar Wrote:So currently you have to exit the emu manually and then the XBMC process continues. With my solution you wouldn't be able to exit the emu manually anymore because XBMC would no longer get the continue-signal - you would have to use a button on your remote to exit the emu. However you could workaround that problem by using two launch-scripts.
A solution which would allow you to either exit the emu manually or kill it using a button on your remote, could look like this:
/home/xbmc/launcher.sh
Code:#!/bin/sh
/usr/bin/killall -STOP xbmc.bin
/home/xbmc/launcher-run.sh "$@"
/usr/bin/killall -CONT xbmc.bin
/home/xbmc/launcher-run.sh
Code:#!/bin/sh
echo $$ > /home/xbmc/launcher.pid
exec "$@"
/home/xbmc/launcher-kill.sh
Code:#!/bin/sh
kill `cat /home/xbmc/launcher.pid`
As your XBMC process is not running, you can not add the kill-script to your remote.xml file, like the OP suggested in his first post. Instead you have to use "irexec" to execute the kill script when a button on the remote is pressed.
I don't fully understand how/when/from where these scripts should be executed.
My target is to run command:
mednafen </path/to/rom.nes>
and before this command will be executed I would like to exit XBMC and then after pressing key on the remote I would like to return to XBMC.