Kodi Community Forum

Full Version: Powering off XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using the XBMC official remote app on android. Everything works great except for the power off function. I have XBMC installed on a distro called openELEC which requires a command 'poweroff' to turn off.

I have managed to get the Poweroff command to work from the menu in XBMC to turn off the system. I followed instruction from a forum where I edited a couple of lines of code so that when the shutdown or reboot options were selected, it ran the commands that were compatible with openELEC. That works fine. I would now like to make the same changes so the Poweroff button on the remote works.

I have had a look around the XBMC folder but I can not find how the commands are received and interpereted from the remote. Can anyone point me in the right direction please?
What does the power button currently do?

I can power off via my remote in OpenELEC.

have you checked your logs?
Code:
cat ~/.xbmc/temp/xbmc.log | paste
cat /var/log/messages | paste

why not ask this on the OpenELEC forums?
I think this problem only occured in the latest Beta of openELEC.

I have found where the command was passed and, as I thought, it has fixed my problem.

For anybody else with the same issue, the file is in /usr/share/xbmc/system/keymaps/remote.xml. Copy that file into /storage/xbmc/userdata/keymaps. You can then edit the commands sent when using a remote.

I edited the Power option to run "System.Exec("/storage/XBMCPower/shutdown.sh")
shutdown.sh being a file containing "sync;poweroff -f" and made executable.

Works perfectly now.