2010-11-18, 20:08
I wanted to change the button on the front of the box to sleep instead of shutdown. There appears to be no hook into the hardware button inside XBMC (why this thread didn't solve my problem). Took some poking around and it was really easy via SSH to change how Ubuntu/XBMC Live handles the button.
To change the hardware power button function in Ubuntu/XBMC Live when not using a window manager:
1. SSH to the box
2. Backup the button script:
3. Edit the button script:
4. Modify the last line with a "#" in front, and add the following line so it appears as this:
My box uses 5watts in sleep, and 5watts when powered off And on top of that it takes almost 2 minutes to cold boot off flash drive, sleep is way better.
To change the hardware power button function in Ubuntu/XBMC Live when not using a window manager:
1. SSH to the box
2. Backup the button script:
Code:
sudo cp /etc/acpi/powerbtn.sh /etc/acpi/powerbtn.sh.BAK
Code:
sudo pico /etc/acpi/powerbtn.sh
Code:
# If all else failed, just initiate a plain shutdown.
#/sbin/shutdown -h now "Power button pressed"
/etc/acpi/sleep.sh
My box uses 5watts in sleep, and 5watts when powered off And on top of that it takes almost 2 minutes to cold boot off flash drive, sleep is way better.