If you are running Linux on your MacBookAir and want the keyboard light brightness changed automatically depending on the ambient light (just as OS X does), continue reading.

I’ve written a small daemon named lightum, source is on github and licensed under GPL-2+.

Usage: lightum [-m value] [-p value] [-f] -m 0..255 : maximum brightness value between 1 and 255 (default=255) -p num : number of seconds between light sensor polls (default=8) -f : run in foreground (do not daemonize) -v : verbose mode, useful for debugging with -f

For it to work you need dbus installed, and your MacBook should have the light sensor located in /sys/devices/platform/applesmc.768/light (should be available on all MacBookAir and MacBookPro versions which have a backlight on keyboard, as far as I know).

If you are running Ubuntu, you can install it by adding lightum-mba ppa to your system:
` sudo add-apt-repository ppa:poliva/lightum-mba sudo apt-get update sudo apt-get install lightum `

Otherwise, you can build it from source.