[mythtv-users] Script to turn monitor fully on and active [SOLVED]

Dave M G martin at autotelic.com
Tue Mar 1 07:58:54 UTC 2011


Nick, Yeechang,

Thank you for responding.

> <URL:http://www.gossamer-threads.com/lists/mythtv/users/384313#384313>

Yeechang's link had the answer.

All I had to do was:

$ sudo apt-get install xdotool

... and then edit my script to have an extra xdotool command, so it
looks like this:

- - -

#!/bin/bash

STATUS=`xset -q | grep "Monitor is" | awk '{print $3}'`

if [ "${STATUS}" = "On" ]
then
   xset dpms force off
else
   xdotool key shift; xset dpms force on
fi
exit 0

- - -

So, if I understand this, xdotool sends a fake shift-key press which
"activates" the screen, and then when xset turns on the screen, it has a
signal to work with.

I suppose it might work the other way round, xset then xdotool, but it's
working perfectly for me, so I'm not so motivated to keep tinkering.

Thanks for the answer!

-- 
Dave M G


More information about the mythtv-users mailing list