Locking the screen, turning off the LCD backlighting

I just concocted a shell-script to lock the desktop and shut down the back lighting on my LCD screen. Very nice for preserving the life of flat-screens :D

#!/bin/sh
gnome-screensaver-command --lock
sleep 1
xset dpms force off

I was wholly expecting the screen to stay “dead” even after having begun using the mouse again, but it just lit up, and presented me with the password screen. Very nice!

In case it wouldn’t have, I’d have just entered the password, popped up a terminal (shortcuts for the win) and either entered xset dpms force on, or have prepared a script to do it for me. In any case, very nice. Now I just need to figure out how to bind Ctrl+Meta+l to execute that script…

Update:

And the answer came after two prayers to the great god of eternal knowledge (Google) ;D

Tags: , ,

2 Responses to “Locking the screen, turning off the LCD backlighting”

  1. […] vän till mig har fixat detta script för att släcka bakgrundsbelysningen på lcd skärmen direkt vid låsning av […]

  2. […] Reusing old knowledge about how to manually add shortcuts to metacity, all I had to do was to create a script which ascertained the status of the psmouse module (loaded or not) and upon that, either removed or loaded it. […]