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.
|PasswordPing Ltd.'s Exposed Password and Credentials API Service||Apr 28, 2017|
|Graph Any Data with Cacti!||Apr 27, 2017|
|Be Kind, Buffer!||Apr 26, 2017|
|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|
- Graph Any Data with Cacti!
- Teradici's Cloud Access Platform: "Plug & Play" Cloud for the Enterprise
- The Weather Outside Is Frightful (Or Is It?)
- Simple Server Hardening
- Understanding Firewalld in Multi-Zone Configurations
- Preparing Data for Machine Learning
- Server Technology's HDOT Alt-Phase Switched POPS PDU
- Gordon H. Williams' Making Things Smart (Maker Media, Inc.)
- IGEL Universal Desktop Converter