Tech Tip: Go Green On Your Screen(saver)
I usually lock my screen when I leave my cubicle for a tea-break etc. With all the talk of saving energy these days I've disabled screen-savers on my system. Still, when I'd lock my screen I noticed that the LCD didn't turn off completely. Wanting to go as green as I could I wanted to switch off the LCD as well.
The following command does that:
xset dpms force off
When I press "Alt+Ctrl+L" (lock screen), the following command is invoked:
What I want now is to associate the following command with a different shortcut key:
gnome-screensaver-command --lock; xset dpms force off
So that I can lock as well as power off my LCD screen with a keyboard shortcut. To do this I installed xbindkeys to add a custom shortcut key. When you have xbindkeys installed create created the default config file:
xbindkeys --defaults > /home/your-user-name/.xbindkeysrc
Now assign a shortcut key. To do this you edit the config file (or if you prefer you can install xbindkeys-config) and append the following lines to the file:
# lock&blank "gnome-screensaver-command --lock; sleep 1; xset dpms force off;" alt+control+k
You also should remove all the enabled lines (comment them out), at least in my case they somehow interfered with my other shortcuts. I also had to add the sleep 1 between the commands to get it to work, perhaps due to compiz animation time.
Now, when I press "alt+control+k" I save power as well as lock my screen.
Tested on Ubuntu 8.10 running on Lenovo T61p.
|Preparing Data for Machine Learning||Apr 25, 2017|
|openHAB||Apr 24, 2017|
|Omesh Tickoo and Ravi Iyer's Making Sense of Sensors (Apress)||Apr 21, 2017|
|Low Power Wireless: 6LoWPAN, IEEE802.15.4 and the Raspberry Pi||Apr 20, 2017|
|CodeLathe's Tonido Personal Cloud||Apr 19, 2017|
|Wrapping Up the Mars Lander||Apr 18, 2017|
- Preparing Data for Machine Learning
- Understanding Firewalld in Multi-Zone Configurations
- The Weather Outside Is Frightful (Or Is It?)
- Teradici's Cloud Access Platform: "Plug & Play" Cloud for the Enterprise
- From vs. to + for Microsoft and Linux
- Bash Shell Script: Building a Better March Madness Bracket
- Simple Server Hardening
- Gordon H. Williams' Making Things Smart (Maker Media, Inc.)
- Buddy Platform Limited's Parse on Buddy Service