I received an IBM Thanks! award recently from Darren for helping out with the Feel Good Inc. Extreme Blue project. One of the choices was a ‘Recycled Office Pack’ which sounded interesting and so I thought I’d go for that:

All items say things like ‘made from recycled paper and card’, ‘using sustainable timber’ etc.
Archive for September, 2008
Big Blue goes green
Friday, September 26th, 2008Going green… slightly
Wednesday, September 3rd, 2008A simple thing but one that made me feel quite virtuous. I’ve written a very very simple script that turns off the screen whenever I lock the computer. Should save some energy every time I go to a meeting or off for a cuppa.
For anyone interested, it’s a Perl script which watches for the D-Bus signals from gnome-screensaver. Code is as follows:
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver',member='SessionIdleChanged'\"";
open (IN, "$cmd |");
while (<in>) {
if (m/^\s+boolean true/) {
system('/etc/acpi/screenblank.sh')
}
}
Note that it relies you running Linux, using GNOME and there being a screen blanking script ‘/etc/acpi/screenblank.sh‘ (which in turn executes ‘/usr/share/acpi-support/screenblank‘ for every display). Not too much to ask I’m sure
– Edit 8th October 2008:
Since upgrading to Ubuntu Karmic, this script no longer seems to work for a couple of reasons. I’ve not investigated in any detail but I do have a new working script using a slightly different D-Bus signal and a different command to blank the screen. Try this if the one above doesn’t work!
#!/usr/bin/perl
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'\"";
open (IN, "$cmd |");
while (<IN>) {
if (m/^\s+boolean true/) {
system('xset dpms force off')
}
}