Kodi Community Forum

Full Version: Easy bash script: kill XBMC, launch app, restart XBMC. Help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to get Stepmania launching correctly from XBMC via Launcher, and getting audio device busy errors in Stepmania. Stepmania is installed and runs fine if I exit XBMC and launch it with "xinit stepmania".

How can I set up a bash script to kill XBMC, launch stepmania, and restart xbmc afterward.
Tried:
Code:
#!/bin/bash
killall xbmc.bin
xinit stepmania
xinit /usr/bin/xbmc --standalone

Works if I've already exited xbmc, but not from Launcher. I believe because after killall, x is still running...?

I feel like I'm probably going about this the wrong way Smile
Any suggestions? All help appreciated.
Quote:Works if I've already exited xbmc, but not from Launcher. I believe because after killall, x is still running...?

I dont know stepmania but if you want use the launcher I dont think you should do xinit, just execute the bin.
Dropped the xinits, but now getting "SDL: No video" type errors when launching stepmania.

Feel like I may be killing/launching XBMC incorrectly to free up audio drivers.

[edit]
Tried with
killall xbmc.bin
sleep 2
and
killall -s9 xbmb.bin

And it doesn't look like stepmania ever tries to run with the script like that. Does terminating xbmc kill any apps run by Launcher as well?
Other ideas?
I use the remote to run my scripts via .lircrc file for irexec.

Code:
begin
     remote = Microsoft_Xbox360
     button = X
     prog = irexec
     repeat = 0
     config = /home/xbmc/start-xbmc.sh
end

begin
     remote = Microsoft_Xbox360
     button = B
     prog = irexec
     repeat = 0
     config = /home/xbmc/start-hulu.sh
end

begin
     remote = Microsoft_Xbox360
     button = A
     prog = irexec
     repeat = 0
     config = /home/xbmc/start-boxee.sh
end

Here is the script that launches hulu
Code:
#! /bin/bash

killall huludesktop

killall xbmc.bin

killall Boxee

/usr/bin/huludesktop &

the killall parts are to make sure nothing is started twice

irexec has to be started in daemon mode on startup.

irexec -d &
rev. Wrote:...

How can I set up a bash script to kill XBMC, launch stepmania, and restart xbmc afterward.
Tried:
Code:
#!/bin/bash
killall xbmc.bin
xinit stepmania
xinit /usr/bin/xbmc --standalone

Works if I've already exited xbmc, but not from Launcher. I believe because after killall, x is still running...?

...

hello I would have a similar issue - I would like to have a script launching Boxee and after closing Boxee going back to XBMC. But I did not manage to start the script at all!!
here: http://forum.xbmc.org/showpost.php?p=717...stcount=17 I described what I have done.
Any suggestions?
thanks,
krijeck