Add Brightness Control to Elementary OS Panel with an Indicator

Last updated: September 13, 2013

If the brightness controls don’t works in your system or you’re not satisfied with the default Fn function key, here’s an app indicator allows to change screen brightness in all the possible brightness values. The applet works in Ubuntu and its derivatives, such as Linux Mint and Elementary OS Luna.

brightness control indicator

It’s useful for me because the Fn+Arrow key in my laptop only change the brightness in 4 levels (zero, one third, two-thirds, full).

Features:

  • Clicking the icon shows you all the possible brightness values, to a maximum of 15 steps.
  • The current value is indicated with a dot.
  • Clicking a menu item sets the brightness to the desired value.
  • Scroll wheel event is enabled on the icon. Scrolling up means higher brightness, scrolling down lower.
  • Control screen brightness with custom keyboard shortcuts.
  • Install Brightness Indicator:

    Press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run below commands one by one to install the indicator from PPA:

    sudo add-apt-repository ppa:indicator-brightness/ppa
    
    sudo apt-get update
    
    sudo apt-get install indicator-brightness

    Or you can download the .deb package and double-click to install it from Launchpad.net

    Once installed, open it from the app menu. Add these commands to your custom keyboard shortcuts to control brightness with your keyboard. You need Elementary Tweak to add a custom shortcut key.

    /opt/extras.ubuntu.com/indicator-brightness/indicator-brightness-adjust --up

    and:

    /opt/extras.ubuntu.com/indicator-brightness/indicator-brightness-adjust --down

    Twitter

    I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

    7 responses to Add Brightness Control to Elementary OS Panel with an Indicator

    1. emil george james January 10, 2014 at 3:19 am

      this indicator is not working in my elementary luna …..

    2. Not working for me either, states I have no backlights. I guess that screen backlighting is what this controls.

      Now, how do we uninstall it?

      • To remove the indicator:

        sudo apt-get remove indicator-brightness

        Then remove the PPA:

        sudo add-apt-repository -r ppa:indicator-brightness/ppa
    3. Awesome itś working great… I like it a lot, thanks for it =D

    4. dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.ubuntu.indicator.brightness was not provided by any .service files

    5. thanks for sharing! works perfectly with “Freya”. to fit my personal taste, i’ve changed it to exponantial behaviour, as i prefer to have more precise control for low brightness settings. to do this, i’ve adjusted the two functions “set_brightness” and “get_curr_brightness” to be exponential. changes are bold:

      def set_brightness(brightness):
      bbb = int(brightness) * int(brightness) / max_brightness
      subprocess.call([‘pkexec’,’/usr/lib/gnome-settings-daemon/gsd-backlight-helper’,’–set-brightness’,”%s” % bbb])
      create_menu(ind)

      def get_curr_brightness():
      c = 0
      try:
      p = subprocess.Popen([‘pkexec’,’/usr/lib/gnome-settings-daemon/gsd-backlight-helper’,’–get-brightness’], stdout=subprocess.PIPE)
      curr_brightness = float(p.communicate()[0])
      curr_brightness = int( ((curr_brightness/max_brightness)**0.5) * max_brightness)
      c = closest(curr_brightness, brightness_settings)
      except:
      c = 0
      return brightness_settings.index(c)