How to set it up:
Gnome Power Manager -which is used by Ubuntu- waits until the screensaver says the desktop is idle and then does its own countdown. So the total time until sleep, is the time until the screensaver comes up plus the time you set in Gnome Power Manager. btw, LiveTV automatically disables the screensaver so we have the covered. We won't accidentally stop someone viewing television.
You will need to setup the screensaver and Gnome Power Manager yourself.
Then create a file as root:
$ sudo nano -w /etc/pm/sleep.d/00_quit-mythfrontend
#!/bin/sh
#
# Kill mythfrontend
case "$1" in
hibernate|suspend)
killall mythfrontend.real
killall mythfrontend
sleep 5s
esac
Set it executable:
$ sudo chmod +x /etc/pm/sleep.d/00_quit-mythfrontend
Your frontend will now be stopped before the machine goes to sleep.
Tip: don't name it 99_kill-mythfrontend, then the network will be down before the frontend has finished its exit ceremony.
Geen opmerkingen:
Een reactie posten