Posts: 1,104
Joined: May 2009
Reputation:
19
You can try mapping a button on the remote with XBMC.RestartApp()
I use the zero button under global.
<zero>XBMC.RestartApp()</zero>
However, if xbmc is hung its unlikely this will do the job but you can use a script that can be called by irexec thats mapped to a button on the remote.
Posts: 206
Joined: Jul 2009
Reputation:
0
I think you're missing my point here. If it were something that simple, just starting xbmc, it wouldn't be any problem. What I want to do is start it as a daemon, just like it's done at boot time. Like I said, my first thought was to run a "service xbmc-live start", but that just doesn't do anything at all and I don't understand why.
/Daniel
Posts: 206
Joined: Jul 2009
Reputation:
0
I still think this is really strange. I've just installed xbmc using the packages by team xbmc and it starts using the standard stuff that comes in the package. It feels like a messy solution to start writing my own init scripts just because the standard script doesn't support restarting xbmc, doesn't it? Shouldn't there be standard way of doing this?
/Daniel
Posts: 7,650
Joined: Jun 2011
Reputation:
287
I don't use XBMC live, so I'm not familiar with the specifics, but since it does start automatically on boot and shuts down on system shutdown, there surely is a standard script that does excatly that.
What you want is not the same though. You need something in case xbmc becomes unresponsive(which actually _should_ never happen), ergo a _workaround_.
Posts: 206
Joined: Jul 2009
Reputation:
0
No. What I need is a way to simply stop a running daemon that has been automatically started at booting time. With every normal daemon I know a simple "service <name> stop" works. With the xbmc-live daemon it doesn't, no matter if xbmc is hanged or not. This is obviously an error.
Btw, I tried simply killing everything xbmc related and trying to start it again by just running it from the command line. What happens then is (quite naturally) that I get "Error: unable to open display", since there is now no X running at all. The point with starting it as a daemon is that the daemon script handles all that and starts Xorg and xbmc.
/Daniel
Posts: 155
Joined: May 2009
Reputation:
0
... The reason I went for my method was because the new xbmc-live script was using uxlaunch, which I could not do a simple 'service xbmc-live stop' it would state that the process wasn't started.
Trying to do a 'service uxlaunch stop/start' would not work - I would have to kill the 'Xorg' process which was running as root - Then I could do a 'service uxlaunch start' this would then fire up xbmc again.
The other reason for my approach was that I was using the AudioEngine branch, and using the xbmc-live daemon to start the service would result in not being able to get any PCM audio - NOTHING I tried worked!
Previously the old xbmc-live package which is bundled in the stable release worked exactly as how you wanted it - You could do a 'service xbmc-live stop/start' and it would do just that, now with uxlaunch it just never did work for me!