Archive for January, 2004

Using the Mail led with remote mail

Saturday, January 10th, 2004

I recently switched all my mail reading over to using IMAP over SSL, and needed to get GNOME’s Inbox Monitor applet to handle it. It doesn’t do it natively, so I had to use a script to do the check. It is done easily with fetchmail.

I have found a way to use the extra leds on the Asus M2400N, which I have added to the script.

The script is this:

#!/bin/sh
MBOX=$HOME/.newmail
MLED=/proc/acpi/asus/mled

test -x /usr/bin/fetchmail || exit 0

if fetchmail --ssl -c > $MBOX+; then
    mv -f $MBOX+ $MBOX
    test -w $MLED && echo 1 > $MLED
else
    rm -f $MBOX+ $MBOX
    test -w $MLED && echo 0 > $MLED
fi

In the preferences of GNOME’s Inbox Monitor, the script runs before each update, and the Mail Spool File is set to $HOME/.newmail.

That’s it.

Extra leds on front of the Asus M2400N

Saturday, January 10th, 2004

I was browsing through the file /usr/src/linux/drivers/acpi/asus_acpi.c on my laptop where I noticed this:

echo 1 > /proc/acpi/asus/mled

will turn on the mail-arrived led on the front-right of the laptop. It is turned off by writing a “0” to the file.

Likewise, the Wi-Fi activity led can be turned on and off by writing to /proc/acpi/asus/wled.