Friday, June 18, 2010

Setting Brightness right on Ubuntu

Well, i accept it. I tried everything available on Google and nothing seems to work for me to control my Lenovo laptop's screen's brightness.
So i wrote a little script to get my work done.

if [ $# -ne 1 ]
echo "Usage: bright 50"

n=$(echo "ibase=10;obase=16;$x" | bc)

sudo setpci -s 00:02.0 F4.B="$n"

#End of

Then modfied my .bashrc as:

alias bright=$HOME/
bright 50 #Set Brightness to 50%

Now use on command line as:
bright 60

Am happy as of now with this!!

No comments:

Post a Comment