One of the big disadvantages of using a standard PC monitor as your screen for MythTV is that when you're done watching it, you have to get up to go physically press the power button to turn it off.
Well, no more. Ian Forde has come up with a great solution to the problem. Here is a script and lirc configuration that will let you map a button on your remote to power off your monitor from using the remote control. Many people would map this to the power button on the remote.
First, create the following shell script:
/usr/local/bin/monitorpowerbutton.sh
#!/bin/bash
STATUS=`xset -q | grep "Monitor is" | awk '{print $3}'`
if [ "${STATUS}" = "On" ]
then
xset dpms force off
else
xset dpms force on
fi
exit 0
Running that script should toggle your monitor in and out of power save mode. Test it to make sure it works before we complicate things by mapping it to a remote button.
Now, it's time to link it to your remote, by adding an entry in your .lircrc file. You will need to map the button to the button on your own remote.
# Red Button begin prog = irexec button = Red repeat = 4 config = /usr/local/bin/monitorpowerbutton.sh end

Don't forget irexec
Dennis Hand, the nice guy who puts together the MythDora Linux distribution sent me and email. I figured I'd just add it as a comment and give him credit rather than weave it into the existing page.
"I'm adding the monitor button power off script to the new build [of MythDora]. I noticed on your site that it requires irexec but no mention making sure that it's running. This may throw some people off. You may want to update the instructions to have irexec started first."
Thanks Dennis.
What do you mean by starting
irexec
irexec not running
irexec: could not connect to socket
irexec: Connection refused
anybody know what's wrong?
info:
using ubuntu 7.04
/etc/init.d/lirc is running
tried w/ sudo
dmesg | tail --> [13356.608986] lirc_dev: IR Remote Control driver registered, at major 61
[13356.611779] lirc_streamzap: no version for "lirc_unregister_plugin" found: kernel tainted.
[13357.505919] lirc_streamzap[-1]: Streamzap, Inc. Streamzap Remote Control on usb2:2 attached
[13357.505928] lirc_dev: lirc_register_plugin: sample_rate: 0
[13357.506957] usbcore: registered new interface driver lirc_streamzap
[13357.506965] lirc_streamzap $Revision: 1.21 $ registered
The reason the computer
WTF
WTF are you going on about?
Waking up