No subject
Mon Mar 10 15:32:33 UTC 2008
begin
prog = irexec
remote = mx600_cable_043
button = On
repeat = 0
delay = 10
config = /usr/bin/xscreensaver-command -deactivate; echo 'Press
button again within three seconds to restart MythTV' |
/usr/local/bin/putfifo /tmp/onscreen && ~/bin/mythpowerbutton &
end
The kill button only functions if it is pushed twice within three
seconds; otherwise it simply displays a message on the screen through
putfifo (a little utility I found for this purpose since I didn't like
mythtvosd's output) and, incidentally, also turns off the screensaver
if running. The contents of my mythpowerbutton script:
#!/bin/bash
PROG=mythfrontend
STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`
if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ]
then
if [ $STATUS -eq 0 ]
then
( $PROG & )
else
# play /usr/share/sounds/gtk-events/toggled.wav
if [ -a /tmp/mythpowerbutton-off ]
then
touch /tmp/mythpowerbutton-on;
exit;
else
touch /tmp/mythpowerbutton-off;
sleep 3;
if [ -a /tmp/mythpowerbutton-on ]
then
play /usr/share/sounds/gtk-events/activate.wav
rm -rf /tmp/mythpowerbutton-o* && killall $PROG
fi
rm -rf /tmp/mythpowerbutton-o*
fi
rm -rf /tmp/mythpowerbutton-o*
fi
fi
exit 0
--
Frontend: P4 3.0GHz, 1.5TB software RAID 5 array
Backend: Quad-core Xeon 1.6GHz, 6.6TB sw RAID 6
Video inputs: Four high-definition over FireWire/OTA
Accessories: 47" 1080p LCD, 5.1 digital, and MX-600
More information about the mythtv-users
mailing list