Detecting a blank screen

Detecting a blank screen

Post by Glenn Morri » Fri, 08 Feb 2002 09:28:13



Hi,

Is there an easy way to detect when the screen has been blanked, say after
an xset timeout, or the activation of a blank screensaver? Basically, I
have a shell script that I want to run when the screen is blank. An
alternative would be to check the keyboard + mouse idle time (the trigger
for blanking), but I don't know how to do that either. If there's a simple
(ie not involving C-coding!) way to do that, that would be fine instead.

At the moment, I'm just getting the idle time from the output of `who -i',
but that is not very satisfactory as it only checks terminals, and not
activity in Emacs windows, for example.

TIA,

Glenn

 
 
 

Detecting a blank screen

Post by Ian Stirlin » Sat, 09 Feb 2002 00:00:22



> Hi,
> Is there an easy way to detect when the screen has been blanked, say after
> an xset timeout, or the activation of a blank screensaver? Basically, I
> have a shell script that I want to run when the screen is blank. An

xset q 2>1 |grep blanked

Or simila

--

---------------------------+-------------------------+--------------------------
Tad Williams has an interesting new fantasy: http://www.shadowmarch.com/

 
 
 

Detecting a blank screen

Post by Glenn Morri » Sat, 09 Feb 2002 01:57:09




> > Is there an easy way to detect when the screen has been blanked, say after
> > an xset timeout

> xset q 2>1 |grep blanked

That doesn't work for me:

xset s 1; sleep 5; xset q >& xset.out

Output of xset states "Monitor is On". This technique will detect when the
monitor is in suspend, but it doesn't seem to do anything when it's blank
but still on.

Glenn

 
 
 

Detecting a blank screen

Post by Ian Stirlin » Sat, 09 Feb 2002 05:37:27





>> > Is there an easy way to detect when the screen has been blanked, say after
>> > an xset timeout

>> xset q 2>1 |grep blanked

> That doesn't work for me:

> xset s 1; sleep 5; xset q >& xset.out

> Output of xset states "Monitor is On". This technique will detect when the
> monitor is in suspend, but it doesn't seem to do anything when it's blank
> but still on.

Well, set the monitor to go off rather than blank?

Alternatively, perhaps inspection of the xset q source might help?

--

---------------------------+-------------------------+--------------------------
"An enemy will usually have three courses open to him.  Of these he will
select the fourth."                                    -- Helmuth von Moltke

 
 
 

1. vi blanks out, long listing blanks screen

On the console of a sparc5 solaris 2.3, (and on many terminal sessions),  
when using vi, the first screenful of information appears and then  
scrolling down makes lines disappear, except for the line the cursor is  
on and the last line on the creen.  Scrolling up only reveals the first  
lines that appeared on the first screenful.
Similarly, when listing a man page, ls, cat, whatever, any amount of  
lines that scrolls past the screen "jumps" to a new blank screen, rather  
than scrolling down a line at a time? Is this a know bug, and is there a  
way to fix it?
Thanks.

--  


http://www.interport.net/~ford/

2. Solaris on Aptiva

3. olvwm- get current screen and blank screen

4. Thin X server

5. Console-Screen-Blanking: black chars on white screen

6. Sorry, help again!!

7. detect 24 consecutive blank lines

8. How can you redraw the current state of a virtual screeen?

9. expect detecting a blank line

10. Detecting blank CDs in drive

11. xfree86 4.0/2.4.0-test10 on iMac/DV, starts, but gives only blank screen

12. XFree86 4.0 + Virge GX = Blank screen

13. Apache timeout... and the blank screen of death?