I created this script to edit screen brightnes on a macbook.
First you have to install applesmc-dkms:

first add this line:

deb http://ppa.launchpad.net/poliva/lightum-mba/ubuntu precise main...