Sensor applet on a ThinkPad

It was a boring sunday morning, and friends kept telling me I should write something in here, so I looked for something to do that I could then post here.

Here we are. I recently installed a script to control the fan of my ThinkPad and I used gkrellm to keep an eye on the system’s temperature to check the laptop wasn’t melting.

I didn’t particularly like having gkrellm’s window around, so I looked on Gnome files for an applet that could do the same. I found Sensors Applet, but it only displayed the value reported by the standard ACPI driver, wich is just the CPU temperature. The ibm_acpi driver reports more values in a different file, so I went and added a ThinkPad module to Sensors Applet.

If you want to install the patched version, download Sensors Applet 1.5.2 and my patch.

Uncompress the source and apply the patch:

$ tar xzf sensors-applet-1.5.2.tar.gz
$ cd sensors-applet-1.5.2
$ patch -p1 < sensors-applet-thinkpad.diff

Build and compile as usual (you need to install the applet in the same prefix as the Gnome Panel, unless you know what you are doing):

$ ./configure --prefix=/usr/
$ make
$ sudo make install

Add the applet to the panel and activate the sensors as you can see here:

I sent the patch to Alex, I hope he likes it and commits it to the official sources.