Programmatic control of screen-saver

2003-11-12 Thread Malcolm Kay
I have a machine controlling a tester. Tester control and display is via a 
virtual console terminal. (X is not installed on the machine)

I need to blank the screen (screen saver style) when there is no terminal
activity for some time -- much the same as as normal screen-saver 
operation except that screen output as well as keyboard input should
inhibit the screen-saver taking over or cause the normal terminal display
to be restored if the saver is already in effect.

I would hope that there might be some ioctl call to the terminal which 
could be used from within the tester control software to wake up the 
terminal or prevent the screen saver taking over until a further timeout
has elapsed. I've not been able to find such an ioctl call parameter.


Does anyone have any ideas or a solution please?

(FreeBSD 4.8-Release)

Malcolm Kay

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Programmatic control of screen-saver

2003-11-12 Thread Matthew Seaman
On Wed, Nov 12, 2003 at 11:33:07PM +1030, Malcolm Kay wrote:
 I have a machine controlling a tester. Tester control and display is via a 
 virtual console terminal. (X is not installed on the machine)
 
 I need to blank the screen (screen saver style) when there is no terminal
 activity for some time -- much the same as as normal screen-saver 
 operation except that screen output as well as keyboard input should
 inhibit the screen-saver taking over or cause the normal terminal display
 to be restored if the saver is already in effect.
 
 I would hope that there might be some ioctl call to the terminal which 
 could be used from within the tester control software to wake up the 
 terminal or prevent the screen saver taking over until a further timeout
 has elapsed. I've not been able to find such an ioctl call parameter.
 
 
 Does anyone have any ideas or a solution please?

See vidcontrol(1):

# vidcontrol -t 30

sets the console screensaver timeout to 30s, and

# vidcontrol -t off

turns off the console screensaver.  This does indeed operate using the
CONS_BLANKTIME ioctl -- see the code in the set_screensaver_timeout()
function in /usr/src/usr.sbin/vidcontrol/vidcontrol.c and the
sys/consio.h header file.

I think that ioctl should do what you want, although I'm not sure that
setting the blanking time to zero would actually cancel a running
screen saver.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature