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
<button>
<type>SHUTDOWN</type>
<text>Sleep</text>
<action>EXEC sudo shutdown -h +30</action>
</button>
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:
<button>
<type>SHUTDOWN</type>
<text>Sleep</text>
<action>EXEC sudo shutdown -h now &</action>
</button>
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"?
Thanks,
-Matt
_________________________________________________________________
Earn cashback on your purchases with Live Search - the search that pays you back!
http://search.live.com/cashback/?&pkw=form=MIJAAF/publ=HMTGL/crea=earncashback
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080624/0d808ffc/attachment.htm