This script doesn't seem to work for me, but I'm using lucid.There's a script that needs sudo and changes the maximum value of brightness, effectively changing the current value.
It works with KMS, I think, if you don't mind assigning it to a different shortcut and providing your password every time you want to change the brightness.
If you're assigning it to shortcuts, remember to write:Code:#!/bin/bash function getAddr { ADDR=`lspci | grep VGA | cut -d' ' -f1` } function getBL { CURR=`sudo setpci -s $ADDR F4.B` } function setBL { sudo setpci -s $ADDR F4.B=$1 } function toDec { DEC=`printf "%d" 0x${1}` } function toHex { HEX=`printf "%02x\n" ${1}` } function inc { NEWVAL=`expr $1 + 10` if [ $NEWVAL -gt 255 ] then NEWVAL=255 fi } function dec { NEWVAL=`expr $1 - 10` if [ $NEWVAL -lt 0 ] then NEWVAL=0 fi } getAddr getBL toDec $CURR case $1 in up) inc $DEC ;; down) dec $DEC ;; *) echo "Usage: backlightControl.sh (up|down)" exit -1 ;; esac toHex $NEWVAL setBL $HEX exit 0
I tried this and it workedCode:gksu /home/USER/backlight.sh up gksu /home/USER/backlight.sh down
I set it to Super (windows key) + Left/Right, so it's right next to Fn anyway.
Bookmarks