More silly 3b1 quesitons. :-)

Jon LaBadie jon at jonlab.UUCP
Mon May 2 09:21:20 AEST 1988


In article <107 at marque.mu.edu>, roger at marque.mu.edu (Roger Abrahams) writes:
> Sorry, but the screen blanker is a feature of versions 3.50 and later.  There
> is a man page in the 3.0 distribution, but the command is missing.
> 						- Roger

The capability was present in 3.0 software also.  I stumbled across it
while reading some header files (window.h).  To demonstrate, the little
program that follows (screen_saver.c) would document your PC's ability
to timeout the screen.

Be sure to read the HOWEVER after the program if you are using 3.0.

------------------------------------------
#include <sys/window.h>

#define DFLT_SEC	(600)
#define STDOUT		(1)

main(argc, argv)
int argc;
char **argv;
{
	int new_seconds, old_seconds;

	if ( argc == 1 || (new_seconds = atoi(argv[1])) == 0 )
		new_seconds = DFLT_SEC;
	
	old_seconds = ioctl(STDOUT, WIOCSCR, new_seconds);

	printf("Set screen saver to %d seconds, ", new_seconds);
	printf("old setting was %d seconds.\n", old_seconds);
	
	return (old_seconds == -1) ? -1 : 0;
}
----------------------------------

However!!!  The reason no one was told of this little goodie, is the
presence of a hardware?/software? problem on some early PC's.  It seems
that if the screen was left blanked for a long time (long being about
1 to 2 hours on the machine I was using), the keyboard would die.  I
guess it was lonely or something.  Anyway, the only way to get the
system back was to reboot.  I believe that remote operations continued
to operate, only the console died.

If you are using 3.0 (WHY?) try the screen saver program above.  Leave
the screen blanked overnight.  If the keyboard is active in the morning,
you've got a screen saver.

Jon LaBadie
{ihnp4, ulysses, ihnp4}!jonlab!jon



More information about the Comp.sys.att mailing list