* Re: screensaver
2005-04-14 17:03 screensaver sauro
@ 2005-04-14 18:11 ` Richard B. Johnson
0 siblings, 0 replies; 3+ messages in thread
From: Richard B. Johnson @ 2005-04-14 18:11 UTC (permalink / raw)
To: sauro; +Cc: linux kernel mailing list
On Thu, 14 Apr 2005, sauro wrote:
> Greetings.
>
> I am using a 2.4 Linux workstation in text mode (no graphic interface).
> After some time, Linux activates the "screensaver" and the monitor goes blank
> on "stand by" mode until activity is detected from the mouse or keyboard.
>
> Is it possible to disable this screensaver, so that the monitor keeps on all
> the time?
>
> Thanks in advance.
>
Yes, but you need to send the screen some escape sequences, the
last time I checked. Subroutines included do the following:
noblank() Stops screen blanker (what you want).
scr() Resets ANSI mode to return from shifted to normal.
Sometimes the screen gets shifted after accidentally
reading binary files.
cls() Clear the screen.
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// This program may be distributed under the GNU Public License
// version 2, as published by the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330 Boston, MA, 02111.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
static const char fix[]={27, '[', '3', 'g',
27, '[', 'H', 27, '[', 'H', 27, '[', 'H',
27, '[', 'H', 27, '[', 'H', 27, '[', 'H',
27, '[', 'H', 27, '[', 'H', 27, '[', 'H',
27, 'c', 27, ']', 'R' };
static const char blk[]={27, '[', '9', ';', '0', ']'};
static const char clr[]={27, '[', 'H', 27, '[', 'J' };
void noblank(int fd){ write(fd, blk, sizeof(blk)); }
void cls(int fd) { write(fd, clr, sizeof(clr)); }
void scr(int fd) { write(fd, fix, sizeof(fix)); }
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Dick Johnson
Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
^ permalink raw reply [flat|nested] 3+ messages in thread