Restart xbmc via ssh
#1
Sometimes my xbmc hangs and doesn't respond any more, but i can still login via ssh.

Is it possible to restart xbmc via ssh without having to restart the whole pc?
Reply
#2
sudo /etc/init.d/xbmc-live restart

but that will only work if you installed xbmc live in some way, not if you start xbmc with your own scripts

I sometimes have to do: sudo /etc/init.d/xbmc-live stop and then start, but most of the time restart works.
Reply
#3
flobbes Wrote:Sometimes my xbmc hangs and doesn't respond any more, but i can still login via ssh.

Is it possible to restart xbmc via ssh without having to restart the whole pc?


sure

start xbmc like this from a shell script

Code:
#!/bin/bash
while [ /bin/true ]
do
        /usr/bin/xbmc -fs
        sleep 2
done

then you can kill the xbmc and xbmc.bin processes

killall -9 xbmc xbmc

and xbmc will restart

make sure you don't call the above script xbmx, start_mediacentre or similar
Reply
#4
Thank you worked fine.
Suggesting im too lazy to type in my sudo pw when executing the script is it possible to make /etc/init.d/xbmc-live executable for everyone or could that be risky?
Reply
#5
flobbes Wrote:Thank you worked fine.
Suggesting im too lazy to type in my sudo pw when executing the script is it possible to make /etc/init.d/xbmc-live executable for everyone or could that be risky?

You can use the chmod command to allow anyone to execute:
Code:
sudo chmod 755 /etc/init.d/xbmc-live

As you mentioned though, doing so isn't the best idea from a security perspective.

Another option might be to change ownership of the file. I'm not positive of what specifically offhand, but that could result in some undesired behavior:
Code:
sudo chown xbmc /etc/init.d/xbmc-live
Reply

Logout Mark Read Team Forum Stats Members Help
Restart xbmc via ssh0