I am running Red Hat Enterprise Linux 7.4. I have done a minimal install so that I don't have X11, xorg, xset or anything x related installed. I am trying to keep the monitor from going blank. When I log in I can run the following command which does the trick:

setterm -blank 0 -powerdown 0 -powersave off

However, when I put that in a script to run at boot time (I call the script from rc.local for now) it doesn't work. I am trying to keep the screen on even before a login. Any suggestions?


At least the first two parts are realised by sending an escape sequence to the console handler, as can be demonstrated like this:

$ setterm -blank 0 -powerdown 0 | od -c
0000000 033   [   9   ;   0   ] 033   [   1   4   ;   0   ]

The easiest way of doing this automatically is to add this output to the file /etc/issue which is sent to the screen before the login: prompt:

# setterm -blank 0 -powerdown 0 >> /etc/issue

Now the escape sequence is always sent to the screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.