Skip to contentSkip to conversation

screensaver

DISCUSSION sauro 2 participants 2 messages Apr 14, 2005

lore
Share & tools
lore

sauro

author
#0 lore raw

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.

Signature · 6 lines
Best Regards
Sauro Salomoni

Ztec
Phone: +55 61 322-2544   FAX:+55 61 224-7171
www.ztec.com.br
#1 lore raw
Quoted 9 lines · sauro

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.