2008-12-21, 13:12
I'm setting up my Linux HTPC to have both XBMC and Myth TV on it.
I want to be a good eco-citizen and have the machine power down if it's not being used and Myth TV isn't recording something.
Myth TV provides a hook to allow a script to be run to see if the machine can be powered down (which subsequently sets the wake time in the BIOS when it does shut down).
What would the best way to tell if the HTPC is being "used"? XBMC will be the only application running.
On my other desktop Myth TV system I have a script to tell if a user is logged in. If so, don't shut down. However, since I'm hoping to run a completely keyboard and mouse free system, the system automatically logs in and launches XBMC. Someone will always be logged in.
Options:
1) Make sure we "quit" XBMC when we are finished. The shut down script could then check to see if the XBMC process is running. If so, don't shut down. Has the side affect that we have to remember to do stuff. Also means I need something to start up XBMC via the remote if we want to use it again. Since I'm hoping to use a Wii Remote, I can't use LIRC to start an application.
2) Configure XBMC to go into sleep mode after X minutes and then have the shutdown script see if XBMC is in sleep mode (or gone for some reason). Is this possible? With this solution we'd never shutdown XBMC, just turn off the TV. Nice and easy.
3) Something someone else more Linux savvy than me can come up with!
What's the best way to deal with this
I want to be a good eco-citizen and have the machine power down if it's not being used and Myth TV isn't recording something.
Myth TV provides a hook to allow a script to be run to see if the machine can be powered down (which subsequently sets the wake time in the BIOS when it does shut down).
What would the best way to tell if the HTPC is being "used"? XBMC will be the only application running.
On my other desktop Myth TV system I have a script to tell if a user is logged in. If so, don't shut down. However, since I'm hoping to run a completely keyboard and mouse free system, the system automatically logs in and launches XBMC. Someone will always be logged in.
Options:
1) Make sure we "quit" XBMC when we are finished. The shut down script could then check to see if the XBMC process is running. If so, don't shut down. Has the side affect that we have to remember to do stuff. Also means I need something to start up XBMC via the remote if we want to use it again. Since I'm hoping to use a Wii Remote, I can't use LIRC to start an application.
2) Configure XBMC to go into sleep mode after X minutes and then have the shutdown script see if XBMC is in sleep mode (or gone for some reason). Is this possible? With this solution we'd never shutdown XBMC, just turn off the TV. Nice and easy.
3) Something someone else more Linux savvy than me can come up with!
What's the best way to deal with this