Since I run XBMC as a program, and not standalone, I would just like it to exit when I click the power button. The default behavior is to show the shutdown menu, and I don't want to accidently shut down my computer.
Since I run XBMC as a program, and not standalone, I would just like it to exit when I click the power button. The default behavior is to show the shutdown menu, and I don't want to accidently shut down my computer.
Remap the Power button on the home screen to quit xbmc instead of showing the shutdown menu:
You should modify the
Home.xml
file in your skin folder in/usr/share/xbmc
. For me (Frodo RC3 with the Confluence skin) this is/usr/share/xbmc/addons/skin.confluence/720p/Home.xml
.In this file you need to replace the line (in my case line 1067, see bottom of the post on how to quickly open the file at that position)
by
Now if you click the power button in XBMC it should just exit, without showing a menu.
You need to do this again after XBMC updates since it overwrites the files in
/usr/share/xbmc
.Alternatives / Notes
With the above solution you can still shutdown XBMC using a remote, or the web interface.
Instead of doing the above (simply quiting, not showing the shutdown menu) you can also edit the shutdown menu instead. The menu itself is in
/usr/share/xbmc/addons/skin.confluence/720p/DialogButtonMenu.xml
. The interesting menu buttons are defined from line 73 and down. The shutdown button (id=3
) has the propertychanging this to
should hide it from the menu. You can do the same trick for suspend, reboot, etc.
This still doesn't prevent shutting down from the webinterface I think, If only I knew how to set
System.CanPowerDown=false
...If you know it please add it in the comments.
Extra: Commands to quickly open the file at the right position (1067,33)
Vim (If you don't know it, try to learn it, it is very nice!)
or even better (independent of actual line number)
Nano (terminal editor that is easy to use for beginners)
Gedit (Simple GUI editor)