Powering off XBMC

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jireland Offline
Junior Member
Posts: 2
Joined: Jun 2012
Reputation: 0
Post: #1
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?
find quote
lrusak Offline
Fan
Posts: 385
Joined: Sep 2011
Reputation: 3
Location: Canada
Post: #2
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?

"PPC is too slow, your CPU has no balls to handle HD content." ~ davilla

[Image: watched-clearlogo.jpg]
find quote
jireland Offline
Junior Member
Posts: 2
Joined: Jun 2012
Reputation: 0
Post: #3
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.
find quote