« Paradise lost...? | Main | Shock! Horror! Internet not so risky! »


My LCD monitor's tricky to switch on and off. Not only is its power button in an odd place, but it's also small, unlit, and flush-mounted. That means I invariably hit Brightness or Menu when I'm head away from my desk for an extended period. But, no worries. Linux to the rescue...

The manual page for xset describes it modestly as the "user preference utility for X", and one of those preferences is monitor control.

xset q
for example will list your monitor's current settings, while


xset dpms force off
will turn it off. (DPMS. or Display Power Management Signaling, is more commonly known as Energy Star compliance.)


So by creating a keyboard shortcut to perform the command

sleep 1 && xset dpms force off

you can create a keyboard-based, power-saving, monitor switch. (Moving the mouse or hitting a key will reawaken it.)

In case you're wondering, sleep 1 forces the system to wait a second before executing xset. Keyboards send signals when keys are pressed and released, so without it the monitor would only switch off for as long as you held the key down!





<--Previous Hidden Linux        Next Hidden Linux -->


 

Comments

Thank you for the information.
it helped me.

Thanks you so much! Just what i was looking for. Much appreciated.

Cheers!

This is legendary. Thanks.

Thank you very much for this information! It is very useful for me.

Thank you! I've been trying to do this for a long time.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.