Brightness indicator for Ubuntu Unity

With this indicator you can set your screen brightness in Ubuntu Unity.

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.

A list of application indicators is found here at askubuntu.com.
The launchpad page for this indicator is located here.

To install this indicator add this PPA to your system and execute:
sudo apt-get update
sudo apt-get install indicator-brightness

Screenshot:

Add these commands to your custom keyboard shortcuts to control brightness with your keyboard:
/opt/extras.ubuntu.com/indicator-brightness/indicator-brightness-adjust --up
and
/opt/extras.ubuntu.com/indicator-brightness/indicator-brightness-adjust --down

Comments 51

  1. Casper wrote:

    Great i really needed this.

    Thanks !

    Posted 22 Aug 2011 at 09:09
  2. M.H.R wrote:

    Traceback (most recent call last):
    File “/opt/indicator-brightness/indicator-brightness.py”, line 65, in
    max_brightness = int(p.communicate()[0])
    ValueError: invalid literal for int() with base 10: ‘No backlights were found on your system\n’

    Posted 27 Aug 2011 at 03:17
  3. gorojaa@yahoo.ca wrote:

    Is this safe for use on xubunt?

    Posted 06 Sep 2011 at 05:47
  4. admin wrote:

    @gorojaa: This won’t work on Xubuntu, as it is based on XFCE which uses its own applets. This is only for Unity.

    On XFCE you can use a plugin that can show Gnome applets, and then use Gnome brightness applet.
    For more info see: http://goodies.xfce.org/projects/panel-plugins/xfce4-xfapplet-plugin and http://library.gnome.org/users/gnome-power-manager/stable/applets-general.html.en

    Posted 06 Sep 2011 at 16:00
  5. vivek wrote:

    Indicator throws error in Ubuntu 11.10. Not working.

    Posted 07 Oct 2011 at 20:40
  6. admin wrote:

    @vivek: What exactly is the output when running /opt/indicator-brightness/indicator-brightness.py from the command line?

    Posted 08 Oct 2011 at 12:56
  7. fluppdidupp wrote:

    works perfect with oneiric for me! thanks!

    Posted 10 Oct 2011 at 15:05
  8. fluppdidupp wrote:

    …although i had to chmod +x the py-file, this might be a bug ;)

    Posted 10 Oct 2011 at 15:06
  9. Euloiix wrote:

    Same for me, I cannot get it to work on Oneiric

    Posted 13 Oct 2011 at 21:53
  10. Euloiix wrote:

    This is what I get when I interrupt it from running (because it gets stuck):

    Traceback (most recent call last):
    File “/opt/indicator-brightness/indicator-brightness.py”, line 79, in
    gtk.main()

    Any idea ? I do not know anything about this ‘main’ method

    Posted 13 Oct 2011 at 22:02
  11. Jovan wrote:

    Okay so it worked for me my question is if I can add shortcuts to it to increase the brightness or decrease the brightness :S

    Posted 22 Oct 2011 at 01:46
  12. Juan Fco. Contreras wrote:

    Thanks a lot! It does work!

    Posted 23 Oct 2011 at 18:42
  13. Nicolas Stark wrote:

    Hi, I’ve got everything working with this except The dropdown goes all the way from 1 up to 280! And the values don’t seem to be in order, i.e. 4 is brighter than 120.

    Any idea where these parameters are being taken from?

    Thanks for this work.

    -Nicolas

    Posted 28 Oct 2011 at 18:26
  14. Jeff wrote:

    Very useful, works great on my System76 Gazelle, running 11.10! Might I suggest that you make the range go from 0 to whatever the max is instead of 1 to max? I already modified the version I downloaded but I thought that other people might also like the option to use the minimum screen brightness possible as well.

    In case anyone is wondering what I did, just change lines 21 and 22 to
    if curr_brightness == -1:
    curr_brightness = 0

    and line 56 to
    for i in range(0, max_brightness + 1):

    Posted 05 Nov 2011 at 01:03
  15. Jiří Čertík wrote:

    Ubuntu 11.10, 64-bit: works fine, thank you!

    Posted 05 Nov 2011 at 16:40
  16. Checker wrote:

    If you change the brightness value with the system settings-screen app, the new value is not recognized by your app! No refresh!

    But otherwise it’s realy great stuff! [:-))

    Posted 14 Nov 2011 at 20:15
  17. Tom wrote:

    Hi,
    you did made a good job!

    but

    How can i change the .py script to get brightness steps like 10,20,30…? and not 1,2,3…?
    The list of 255 steps ist to long for me! ;-(
    Thank’s!
    best regards
    tom

    Posted 15 Nov 2011 at 07:15
  18. Jan wrote:

    Hi,

    i’ve packed your indicator and uploaded it to a ppa: https://launchpad.net/~jan-simon/+archive/indicator-brightness

    I also added a .desktop file so one can find it in the dash.
    The natty-deb is untested (as i use oneiric) but should work as well.

    Greeting, Jan

    Posted 19 Nov 2011 at 03:30
  19. admin wrote:

    Great work Jan! Thanks! Will add it to my software sources.

    Posted 20 Nov 2011 at 14:18
  20. radius wrote:

    Thanx it works for XFCE Xubuntu 11.10

    Posted 05 Dec 2011 at 21:14
  21. Diego wrote:

    works like a charm in ubuntu 11.10, i’ve finally solved one of my worst issues on HP DV6 notebook!! THANKS FROM ITALY ^___^

    Posted 06 Jan 2012 at 13:58
  22. Daniel wrote:

    Hi

    What would be the command to increase/decrease brightness when using this program. I ask this so i can add hotkeys.

    Regards
    Dan

    Posted 10 Jan 2012 at 02:10
  23. Sparkle Ishan wrote:

    Great work… Thanx…

    Posted 28 Jan 2012 at 18:42
  24. Christian Stöveken wrote:

    Nice. Can do with a few improvements though.
    i.e.
    for i in range(2, max_brightness + 1, int(round(max_brightness/20))):

    so that gives you 20 brightness settings instead of 254 in my case.
    start with 2 seems a lot better than 1 … because one is no backlight here. and that sucks (even finding the applet to turn it back on).

    further improvements would be numbers from 1 to ten instead of the values, and less steps … but then you would need to take into account that the brightness levels should not increase linear.

    Many thanks … for the script.

    Posted 29 Jan 2012 at 17:48
  25. admin wrote:

    @Christian Stöveken: To get rid of the 254 steps, you can use the altered script that you can find in this post.

    Posted 30 Jan 2012 at 08:52
  26. Iome wrote:

    Thanks, working like a charm here in ubuntu 12.04 alpha :)

    Posted 27 Feb 2012 at 18:33
  27. Jorge wrote:

    The installation went good, then I restarted, the indicator is in place but nothing happens when I change the values of the brightness. Ubuntu 11.10 x64 on Toshiba L-745-SP4142LC :(

    Posted 04 Apr 2012 at 16:16
  28. admin wrote:

    @Jorge: The script executes gnome-power-backlight-helper which is (as far as I know) also used by Gnome/Unity to set the display brightness.
    Does running “pkexec gnome-power-backlight-helper –set-brightness 0″ (or any sensible number) from the command line work for you?

    Posted 04 Apr 2012 at 16:20
  29. Jorge wrote:

    :~/Downloads$ python indicator-brightness-maxsteps.py

    (indicator-brightness-maxsteps.py:3189): Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”,

    (indicator-brightness-maxsteps.py:3189): Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”,

    (indicator-brightness-maxsteps.py:3189): Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”,

    (indicator-brightness-maxsteps.py:3189): Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”,
    ^CTraceback (most recent call last):
    File “indicator-brightness-maxsteps.py”, line 94, in
    gtk.main()
    KeyboardInterrupt
    jcp@JORGE-PC:~/Downloads$

    Posted 04 Apr 2012 at 17:43
  30. Jorge wrote:

    To ADMIN:

    :~$ pkexec gnome-power-backlight-helper –set-brightness 3
    Cannot run program gnome-power-backlight-helper: No such file or directory

    Try to install the package, no result:

    ~$ sudo apt-get install gnome-power-backlight-helper
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package gnome-power-backlight-helper

    Posted 04 Apr 2012 at 17:48
  31. admin wrote:

    Sorry, my bad. I meant “pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper –set-brightness 3″

    Posted 04 Apr 2012 at 18:04
  32. Jorge wrote:

    To ADMIN:

    http://mail.gnome.org/archives/ftp-release-list/2011-August/msg00160.html

    This I found that gnome-power-backlight-helper was removed from gnome-power-manager-3.1.90.tar.xz

    Posted 04 Apr 2012 at 18:06
  33. Jorge wrote:

    To ADMIN:
    OK. I run:

    :~$ pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper –get-brightness
    3
    :~$ pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper –get-max-brightness
    7
    :~$ pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper –set-brightness 1

    But nothing happens…

    Posted 04 Apr 2012 at 18:12
  34. admin wrote:

    @Jorge: I sent you an email.

    Posted 04 Apr 2012 at 18:20
  35. Jorge wrote:

    To ADMIN:
    I found the solution to my problem this way:

    Add the next option under your “Device” section in /etc/X11/xorg.conf and restart:

    Option “RegistryDwords” “EnableBrightnessControl=1″

    This worked for my NVIDIA card.

    Posted 04 Apr 2012 at 21:44
  36. rolf wrote:

    Thanks a lot, very handy.

    Posted 22 May 2012 at 09:41
  37. Aman wrote:

    Installed on 12.04 LTS on an HP Pavilion G6 with ATI Radeon HD 7450.
    Didn’t work :(

    Maybe the ATI card is the culprit?

    Posted 09 Jul 2012 at 14:21
  38. bogret wrote:

    hi, I use a vaio VGN-SZ4XN, with a NVIDIA graphic driver and Ubuntu 12.04, and unfortunately it doesn’t work. Is there a way to fix it?

    Posted 24 Jul 2012 at 01:06
  39. don bright wrote:

    ubuntu 12.04.01

    python indicator-brightness-maxsteps.py

    ** (gsd-backlight-helper:27133): WARNING **: failed to find any devices

    ** (gsd-backlight-helper:27135): WARNING **: failed to find any devices
    Traceback (most recent call last):
    File “indicator-brightness-maxsteps.py”, line 93, in
    create_menu(ind)
    File “indicator-brightness-maxsteps.py”, line 60, in create_menu
    curr_brightness = get_curr_brightness()
    File “indicator-brightness-mapython indicator-brightness-maxsteps.py

    ** (gsd-backlight-helper:27133): WARNING **: failed to find any devices

    ** (gsd-backlight-helper:27135): WARNING **: failed to find any devices
    Traceback (most recent call last):
    File “indicator-brightness-maxsteps.py”, line 93, in
    create_menu(ind)
    File “indicator-brightness-maxsteps.py”, line 60, in create_menu
    curr_brightness = get_curr_brightness()
    File “indicator-brightness-maxsteps.py”, line 38, in get_curr_brightness
    curr_brightness = int(p.communicate()[0])
    ValueError: invalid literal for int() with base 10: ”
    xsteps.py”, line 38, in get_curr_brightness
    curr_brightness = int(p.communicate()[0])
    ValueError: invalid literal for int() with base 10: ”

    Posted 12 Sep 2012 at 05:49
  40. Joubert RedRat wrote:

    In my ubuntu 12.04 doesnt work too, but missing a program on gnome

    redrat@local:~$ indicator-brightness
    Cannot run program gnome-power-backlight-helper: No such file or directory
    Cannot run program gnome-power-backlight-helper: No such file or directory
    Traceback (most recent call last):
    File “/usr/bin/indicator-brightness”, line 78, in
    create_menu(ind)
    File “/usr/bin/indicator-brightness”, line 46, in create_menu
    curr_brightness = get_curr_brightness()
    File “/usr/bin/indicator-brightness”, line 33, in get_curr_brightness
    curr_brightness = int(p.communicate()[0])
    ValueError: invalid literal for int() with base 10: ”

    Posted 15 Oct 2012 at 14:59
  41. Leo wrote:

    Just wanted to let you know, this works perfect on Precise!

    Posted 15 Oct 2012 at 16:19
  42. Hobo4ssassin wrote:

    WORKS in 12.10

    Posted 01 Nov 2012 at 15:07
  43. Poster wrote:

    Could you please update your fine indiciator script on your site with the version found here?

    https://bugs.launchpad.net/indicator-brightness/+bug/1067911

    It shows only levels starting from 1, removing the “zero turns off screen” bug.

    Maybe it is of interest, because several sites link to you.

    Posted 08 Jan 2013 at 14:59
  44. Florian wrote:

    Hi, worked perfectly fine on 12.10 + Asus zenbook.
    However there is a bug whe scrolling up, the brightness value can reah 0 or negavive, and screen is all black, no way to roll back if you moved the mouse !
    I solved thos by changing line 25 :
    if curr_brightness <= 0:
    curr_brightness = 1

    Excellent work thank you very much :)

    Posted 18 Jan 2013 at 00:42
  45. admin wrote:

    Hi Poster, take a look at the new script to control the brightness with your keyboard.

    Posted 25 Jan 2013 at 21:12
  46. admin wrote:

    Hi Florian, take a look at the new script to control brightness with your keyboard.

    Posted 25 Jan 2013 at 21:12
  47. dom wrote:

    ubuntu 12.04 gnome 3.4
    works fine in gnome classic and gnome-shell
    (but no kb shortcuts)
    thanks

    Posted 15 May 2013 at 18:17
  48. Tehnikalac wrote:

    http://tehnikalac.com/screen-brightness-problem-in-ubuntu/

    Posted 17 Jun 2013 at 12:16
  49. Cobuntu wrote:

    I love Indicator-Brightness but the PPA is not working with 13.10 unfortunately. Any chances for making it available soon? That were really great…

    Posted 19 Jul 2013 at 20:10
  50. Arun Mathew wrote:

    I’m not able to set shortcut in ubuntu 13.04??

    Posted 21 Jul 2013 at 20:03
  51. Francis wrote:

    Here on my Ubuntu 14:04 it does not work. You can download the application but the brightness does not diminish brina.

    Posted 23 Sep 2014 at 21:49

Trackbacks & Pingbacks 18

  1. From Brightness indicator for Ubuntu Unity | Ubuntu Geek on 26 Aug 2011 at 17:15

    [...] deb package from here  and install by double clicking on [...]

  2. From Brillo Indicator para Unity | El Blog de Rigo on 27 Aug 2011 at 12:45

    [...] de nuestra pantalla. Para instalarlo, podemos descargarlo como paquete .deb desde el siguiente enlace. Despues lo añadiriamos a las aplicaciones de inicio desde el menu “Aplicaciones de inicio” [...]

  3. From Como instalar un indicador de Brillo para Unity de Ubuntu | Subinet on 27 Aug 2011 at 19:13

    [...] el paquete deb desde aquí e instalalo haciendo doble clic sobre [...]

  4. From Ubuntu / Netbook-Linux auf AC100 - Seite 36 - Android-Hilfe.de on 14 Nov 2011 at 16:09

    [...] [...]

  5. From Ubuntu - pomoc | [Unity] Dodanie aplety jasności do górnego panelu on 04 Jan 2012 at 00:03

    [...] Sam aplet można pobrać jako paczkę DEB z naszej strony (nie jesteśmy twórcami tego apletu, źródło # code.van.rohde): [...]

  6. From Anonymous on 07 Mar 2012 at 07:37

    [...] [...]

  7. From cara menerangkan layar di ubuntu debian linux – brightness indicator » ELBIRTUS on 03 Apr 2012 at 08:17

    [...] deb package from here  and install by double clicking on [...]

  8. From rimonabantexcellence site title on 18 Apr 2013 at 21:31

    [...] Hello http://codevanrohde.nl/wordpress/?p=128 [...]

  9. From Brightness Control Ubuntu | OMG! Ubuntu! on 23 Apr 2013 at 14:35

    [...] You can find instructions on setting those up on the project homepage @ this link. [...]

  10. From Add Brightness Control to Ubuntu Desktop With This Handy App | Unity and Ubuntu - Tweaks you must know! on 23 Apr 2013 at 20:37

    [...] You can find instructions on setting those up on the project homepage @ this link. [...]

  11. From Ubuntu – Les touches Fn pour régler la luminosité ne fonctionnent pas ? | Korben on 24 Apr 2013 at 09:30

    [...] luminosité ne soient pas utilisables. Il est heureusement possible de contourner le problème avec Indicator-Brightness, un soft qui se glisse dans la barre d'état d'Unity et qui permet de régler la luminosité, soit [...]

  12. From Ubuntu – Les touches Fn pour régler la luminosité ne fonctionnent pas ? | - Dépannage Informatique, Limoges et toute la haute vienne, 87, Réparateur Ordinateur, Maintenance PC à Domicile, installation box, créateur de sites intern on 24 Apr 2013 at 09:56

    [...] luminosité ne soient pas utilisables. Il est heureusement possible de contourner le problème avec Indicator-Brightness, un soft qui se glisse dans la barre d’état d’Unity et qui permet de régler la [...]

  13. From Indicator Brightness - comment contrôler la luminosité sur Ubuntu | lemondedestuts on 24 Apr 2013 at 10:32

    [...] Share Si vous rencontrez des problèmes de contrôle de luminosité de l’écran sur Ubuntu les touches (fn) vous pouvez  détourner ou palier a ces problèmes  avec Indicator-Brightness. [...]

  14. From propecia on 24 Apr 2013 at 11:18

    [...]   propecia propecia [...]

  15. From Add Brightness Control to Ubuntu Desktop With This Handy App | Top-Ranked Blog on 24 Apr 2013 at 12:53

    [...] You can find instructions on setting those up on the project homepage @ this link. [...]

  16. From » Screen brightness problem in Ubuntu Tehnikalac on 24 Apr 2013 at 15:30

    [...] forums. You can find instructions for setting up custom brightness buttons on the project homepage (click here). If a PPA is a bit too much for you, you can grab a .Deb installer from the project launchpad page [...]

  17. From Indicador para cambiar el brillo de la pantalla en Ubuntu on 24 Apr 2013 at 20:41

    [...] instalar Indicator Brightness en Ubuntu hay que añadir un repositorio externo, el cual contiene paquetes para Ubuntu [...]

  18. From Add Brightness Control to Ubuntu Desktop With This Handy App | OSOS on 27 Apr 2013 at 11:39

    [...] patches from forums.You can find instructions on setting those up on the project homepage @ this link.Install Indicator Brightness in UbuntuInstalling the applet in Ubuntu 11.10 through 13.04 is as easy [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *