Putting mythfrontend to sleep
This "How To" article pulls together a number of different aspects of customizing MythTV, to accomplish what would seem to be a simple task: putting your MythTV system to sleep.
Introduction
One very common MythTV configuration is to have one machine running both mythfrontend and mythbackend on a custom-assembled, small, quiet machine sitting with the rest of the A/V equipment. I couldn't afford to buy a new computer for MythTV, but I have a lot of computers sitting around the house, so I set up MythTV on two computers. Mythbackend is running on a fairly powerful and very noisy rack-mount server that hangs out with the other noisemakers in the basement. Mythfrontend is running on a PC that I inherited that used to run Windows in an office.
The Problem
The main reason I didn't run all of MythTV on one machine is that our "TV room" is also our bedroom, and all the hardware I had on hand was unacceptably noisy for trying to sleep. Mythbackend needs stay on all the time (or turn itself on and off as needed, as per this excellent How To article on ACPI Wakeup), but we needed to be able to shut down the machine running mythfrontend in order to get to sleep at night.
I haven't yet bought a fancy IR remote control yet, either, so currently we use a regular keyboard at the end of three USB extension cords. We could shot the computer down just fine by selecting "Exit and Shutdown" from the pop-up menu on the main screen, but once it was off, we'd have to walk over to the tower computer itself to press the "On" button. I decided that what we really needed was a new option on the main MythTV menu: "Sleep." (If I ever get a remote control, I'll revise this article to explain how to use the "Power" button of the remote to sleep/wake the PC instead of having a menu option, I hope!)