[Pkg-mozext-maintainers] Bug#562080: xul-ext-traybiff: mail LED notification does not work on Asus laptops

Jakub Adam jakub.adam at ktknet.cz
Tue Dec 22 13:53:57 UTC 2009


Subject: xul-ext-traybiff: mail LED notification does not work on Asus laptops
Package: xul-ext-traybiff
Version: 1.2.3-7
Severity: normal
Tags: patch

This plugin is able to autodetect LEDs present on some laptops and use them for notifications on new mail
arrival (in addition to icon in system panel). Unfortunately this functionality will not work on
Asus laptops, because the position of special file used to control the LED state changed.
Following little patch can be used to fix the issue:

--- traybiff-1.2.3/components/nsMessengerFreeDesktopIntegration.cpp	2007-05-19 10:01:55.000000000 +0200
+++ nsMessengerFreeDesktopIntegration.cpp	2009-12-22 00:29:35.000000000 +0100
@@ -93,6 +93,8 @@
  const char* HW_INDICATOR_CONTROL_FILENAMES[] = {
  	// ASUS laptop led on Linux
  	"/proc/acpi/asus/mled",
+	// ASUS laptop led on Linux, newer interface
+	"/sys/class/leds/asus::mail/brightness",
  	// ACER New Mail led on Linux
  	"/proc/driver/acerhk/led"
  };

Also, to work properly, file /sys/class/leds/asus::mail/brightness must be writable by regular users.
Permissions must be changed after every boot and this can be done by following init script

--- begin of /etc/init.d/mailled-permissions ---

#! /bin/sh
### BEGIN INIT INFO
# Provides:          mailled-permissions
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Allows control of mail leds on some laptops by regular users
# Description:       Sets permissions of special files in /proc and /sys to make them
#		     writable by all users, so applications as mail clients can use
#		     the leds for notification on incoming mail.
### END INIT INFO

# Author: Jakub Adam <jakub.adam at ktknet.cz>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
SCRIPTNAME=/etc/init.d/mailled-permissions

MAIL_LED_FILES="
  /proc/acpi/asus/mled
  /sys/class/leds/asus::mail/brightness
  /proc/driver/acerhk/led"

case "$1" in
   start)
	for LED in $MAIL_LED_FILES; do
		if [ -f $LED ]; then
			chmod 666 $LED
		fi
	done;
	exit 0;
	;;
   *)
	echo "Usage: $SCRIPTNAME {start}" >&2
	exit 3
	;;
esac

--- end of /etc/init.d/mailled-permissions ---



-- System Information:
Debian Release: squeeze/sid
   APT prefers testing
   APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xul-ext-traybiff depends on:
ii  libatk1.0-0                   1.28.0-1   The ATK accessibility toolkit
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  libcairo2                     1.8.8-2    The Cairo 2D vector graphics libra
ii  libfontconfig1                2.6.0-4.2  generic font configuration library
ii  libfreetype6                  2.3.11-1   FreeType 2 font engine, shared lib
ii  libgcc1                       1:4.4.2-3  GCC support library
ii  libglib2.0-0                  2.22.3-1   The GLib library of C routines
ii  libgtk2.0-0                   2.18.3-1   The GTK+ graphical user interface
ii  libnspr4-0d                   4.8.2-1    NetScape Portable Runtime Library
ii  libpango1.0-0                 1.26.1-1   Layout and rendering of internatio
ii  libstdc++6                    4.4.2-3    The GNU Standard C++ Library v3

Versions of packages xul-ext-traybiff recommends:
ii  icedove                 2.0.0.22-0lenny1 free/unbranded thunderbird mail/ne

Versions of packages xul-ext-traybiff suggests:
pn  gnome-desktop-environment | i <none>     (no description available)

-- no debconf information





More information about the Pkg-mozext-maintainers mailing list