Home » Questions » Computers [ Ask a new question ]

How to disable the screen (Linux without X)

How to disable the screen (Linux without X)

I would like to know if there is any way I can disable the screen on a linux distro I'm using Debian. I found a few way to do that with X installed, but not without X.

Asked by: Guest | Views: 236
Total answers/comments: 3
bert [Entry]

I'm not sure which package provides it, but some ACPI-related package includes scripts for blanking the screen based on whether the laptop's lid is open. Although now that I look at the script itself (/etc/acpi/lid.sh), it seems to only work on X. However, the point is that it provides a framework for triggering actions on lid open/close events. You could modify the script to use setterm, and it might do what you want.
bert [Entry]

"If you by chance need to turn off a display remotely, e.g. on a laptop when logged in over SSH...

DISPLAY="":0"" xset dpms force off

Unless you specify a DISPLAY variable, xset would fail with:

xset: unable to open display """""
"If you by chance need to turn off a display remotely, e.g. on a laptop when logged in over SSH...

DISPLAY="":0"" xset dpms force off

Unless you specify a DISPLAY variable, xset would fail with:

xset: unable to open display """""
bert [Entry]

"this should do it for ubuntu server

sudo setterm --powersave off --blank 0

it worked on ""ubuntu-server 16.04"""