FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-17-2008, 11:32 AM
"Oguz Yarimtepe"
 
Default dbus problem

I tried to run the script below to test and adjust my brightness form
console at my hardy. Although i am able to set and get the brightness
values i dont see any change at the backlight. I dont know where to
check. What can be the reason?


Power Manager Brightness Applet is not working, too.

#!/bin/bash
#dependencies : hal and dbus
if [ "x$*" = "x" ]
then
echo ""
echo "Usage : $0 [OPTION]"
echo ""
echo 'Options :'
echo ' get : get the current brightness level'
echo ' up : increase the brightness with one level'
echo ' down : decrease the brightness with one level'
echo ' <level> : set the brigtness level'
exit
fi

dest="org.freedesktop.Hal"
object_path="/org/freedesktop/Hal/devices/computer_backlight_0"
message="org.freedesktop.Hal.Device.LaptopPanel.Ge tBrightness"


#get the current brightness
value="$(dbus-send --system --print-reply --dest="$dest"
"$object_path" "$message" | grep int32 | awk '{print $2}')"

echo "your current brightness level is : $value"

#change the current brightness
if [ "x$1" = "xget" ]
then
echo "your current value is: $value"
exit 0
elif [ "x$1" = "xup" ]
then
value="$(( $value +1 ))"
elif [ "x$1" = "xdown" ]
then
value="$(( $value - 1 ))"
else
value="$1"
fi
message="org.freedesktop.Hal.Device.LaptopPanel.Se tBrightness"
dbus-send --system --print-reply --dest=$dest $object_path $message int32:$value

echo "your new brighness level is :$value"


--
Oğuz Yarımtepe
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org