[mythtv-users] How to shutdown after X minutes?
spartacus003 at hotmail.com
Tue Jun 24 16:28:51 UTC 2008
What's the easiest way to tell Myth to shut down after a specified period of time has passed? It would be nice if I could change the sleep function within the Internal Player's menu to shut down the computer rather than just returning to the main menu if possible. Also, if the recording I'm watching has already ended, I still want it to turn off. For example, if I set the timer to 30 minutes and the recording I'm watching is only 22 minutes long, I still want it to turn off in 30 minutes.
What I've tried so far is to add a custom menu option to the main menu, but I haven't been able to get it to work for whatever reason. I did something similar to adding this
<action>EXEC sudo shutdown -h +30</action>
to the main menu. If I launch Myth by double clicking the front-end icon from Gnome, it doesn't work at all. I'm not sure why myth doesn't respond to the command in this case. If I start the frontend by typing in "mythfrontend" into the command line, then it works, but it "freezes" myth because myth waits for the process to end before regaining control. So I tried to fix that by doing:
<action>EXEC sudo shutdown -h now &</action>
But that still causes problems, myth doesn't seem to like the ampersand.
So the point is: whats the best way to do this? If possible it would be nice to just be able to change the command for the built in sleep function on the internal player, but I don't know if that's easy to change or if it will work if the recording I'm watching has ended. Otherwise, a new menu option is fine with me, but how can I get the above to work so that myth will still listen to the command when I launch the front end by double clicking the icon and so it won't "freeze"?
Earn cashback on your purchases with Live Search - the search that pays you back!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-users