Discussion:
setterm
Russell Coker
2013-05-03 11:15:04 UTC
Permalink
Is setterm expected to work in recent systems?

On the Debian 3.2.0-4-686-pae kernel "setterm -blank poke" doesn't wake the
screen up and "setterm -blank 0" doesn't stop it from blanking.

This is on a fairly stock system without X installed. It's running systemd
and I've run setterm from a ssh login.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
Glenn McIntosh
2013-05-03 12:09:55 UTC
Permalink
Post by Russell Coker
Is setterm expected to work in recent systems?
On the Debian 3.2.0-4-686-pae kernel "setterm -blank poke" doesn't wake the
screen up and "setterm -blank 0" doesn't stop it from blanking.
If you are running it remotely, you will probably need to redirect the
command output to the appropriate tty. Depending on the setup, you might
also need to override the TERM variable:

ssh remote-machine
setterm -term linux -blank 0 >/dev/tty1

I tested on both 2.6.32 and a 3.2.0 kernels. It wouldn't let me remotely
force the blank or wakeup (-blank force, -blank poke) remotely, but
setting the wakeup time to 0 or 1 worked fine (-blank 0, -blank 1).

regards, Glenn
--
sks-keyservers.net 0x6d656d65
Russell Coker
2013-05-03 14:09:58 UTC
Permalink
Post by Glenn McIntosh
ssh remote-machine
setterm -term linux -blank 0 >/dev/tty1
Thanks for that, I've tested that both from a ssh session and /etc/rc.local
and it works well. This is for a server which normally won't have a keyboard
attached and where it's really annoying to plug a keyboard in and press a key
just to see what's on the screen.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
Loading...