Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 14 Apr 2005 14:11:26 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: screensaver |
| |
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |