Seen in ubuntuforums.org:
Scratch from myself: Brightness Key ASUS UL30VT
Scratch from myself: Brightness Key ASUS UL30VT
it's tested on ubuntu 10.04 LTS and ASUS UL30VT
- Make a file called brightness under /bin or /usr/bin and give an executed permission on it.
this the code:
- #!/bin/bash
- export SEED=7
- export BRIGHTNESS=`cat ~/.brightness`
- case "$1" in
- "up")
- export BRIGHTNESS=$[$BRIGHTNESS+$SEED];
- ;;
- "down")
- export BRIGHTNESS=$[$BRIGHTNESS-$SEED];
- ;;
- *)
- export BRIGHTNESS=1;
- ;;
- esac
- if [ "$BRIGHTNESS" -gt "0" ]; then
- echo $BRIGHTNESS > ~/.brightness
- sudo setpci -s 00:02.0 F4.B=$BRIGHTNESS
- fi
- if [ "$BRIGHTNESS" -lt "0" ]; then
- echo "This makes your screen off";
- fi
- Then append brightness up to /etc/acpi/asus-brn-down.sh and brightness down to /etc/acpi/asus-brn-down.sh you could use this command
sudo echo "brightness up" > /etc/acpi/asus-brn-up.sh
sudo echo "brightness down" > /etc/acpi/asus-brn-down.sh- Then try to push your Fn+F5 again...
- hahaha it's darked.
No comments:
Post a Comment