PDA

View Full Version : Set Power button on mce usb remote to reboot xbmc


pyrates
2009-05-19, 00:15
I'm wondering if there is a way to set the power button on the mce usb remote to automatically reboot the pc that xbmc is installed onto. I know I can do it from the command line using sudo reboot, but that prompts me for my password.

And I know if I go to the home screen and click the power option there, I do have the ability to reboot the pc without having to enter my password.

But I'm wondering, from any screen that I am on whether it is the home screen or while a video is playing or music is playing, etc, if I press the power button can it go through a reboot for me automatically?

How does xbmc have an option to reboot without prompting me for my password and can I duplicate the functionality and assign it to the power button on the remote?

This is in case xbmc freezes on me and rather then me get up and press the power button on the pc to shut it down and press it again to power it up or ssh in and run the sudo reboot command, this would save me that time.

topfs2
2009-05-19, 00:19
I'm wondering if there is a way to set the power button on the mce usb remote to automatically reboot the pc that xbmc is installed onto. I know I can do it from the command line using sudo reboot, but that prompts me for my password.

And I know if I go to the home screen and click the power option there, I do have the ability to reboot the pc without having to enter my password.

But I'm wondering, from any screen that I am on whether it is the home screen or while a video is playing or music is playing, etc, if I press the power button can it go through a reboot for me automatically?

How does xbmc have an option to reboot without prompting me for my password and can I duplicate the functionality and assign it to the power button on the remote?

This is in case xbmc freezes on me and rather then me get up and press the power button on the pc to shut it down and press it again to power it up or ssh in and run the sudo reboot command, this would save me that time.

Look up keymap.xml in wiki.
Basically you need to change in global <power>XBMC.Shutdown</power> into <power>XBMC.Reboot</power>

Also shutdown menu in XBMC uses DBus which should work with non-sudo if you have allowed dbus to do it (most distros allow it, including XBMC live and Ubuntu)