Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I'm running Ubuntu 12.04.1 on an iMac G5 with PowerPC architecture. I know there's this thing called fblevel that can adjust screen brightness, but I don't really know how to use it, and I really hate starting at the terminal all day long.

Is there a slider that one can install for this?

Thanks!

share|improve this question
add comment

1 Answer 1

I wrote a simple script to adjust the brightness om my iMac 27" running Ubuntu 11.10 oneiric. The script is using the gsd-backlight-helper thats also available in Ubuntu precise 12.10 so I suppose this also works in 12.10. (let me know)

My solution is to add two brightness icons on the gnome-panel. One for brightness-up and one for brightness-down. (see screenshot)enter image description here

Copy the script imac-brightness.sh in your /home/USER/ directory

#!/bin/bash

# get the brightness as it is now
BRIGHTNESS=$(pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --get-brightness)

# Get the maximum possible brightness to set
MAXBRIGHTNESS=$(pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --get-max-brightness )

# If the user want to set the brightness higher than now the
# script is calles with the argument --up 
# ./imac_brightness.sh --up 
if [ $1 == "--up" ];
   then
    # Check if we got more brightness steps left to raise the brightness
    if [ $BRIGHTNESS -lt $MAXBRIGHTNESS ] ;
        then    
        pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness $(($BRIGHTNESS + 1 ));
    fi  
fi

# If the user want to set the brightness lower than now the
# script is calles with the argument --down 
# ./imac_brightness.sh --down 
if [ $1 == "--down" ]
   then
    # Check if the brightness is't  as low as 1.
    # We won't go lower than 1
    if [ $BRIGHTNESS -gt 1 ] ;
        then    
       pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness $(($BRIGHTNESS - 1 ));
    fi
fi

Make the script executable

chmod 755 ./imac-brightness.sh

Copy the brightness-icons in your home directory (or wherever you want, as long if you know where you put them)

Brightness up icon Brightness-down icon

Now add the icons to the gnome panel (Mouse pointer on the gnome-panel and press left Alt key + right mouse button)

For Brightness DOWN

  • add to panel
  • Custom Application Launcher
  • Name: Brightness Down
  • Command: /home/USER/imac_brightness.sh --down
  • Select the Brightness Down icon

For Brightness UP

  • add to panel
  • Custom Application Launcher
  • Name: Brightness Up
  • Command: /home/USER/imac_brightness.sh --up
  • Select the Brightness Up icon

Notice the double "-" (minus sign) in --up and --down

Now you got two Icon on your gnome-panel. Simply click the Up or Down to adjust the brightness.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.