Dim the screen at dark

  • August 8, 2009
  • Avatar for jacob

Are there times of the night that you find yourself adjusting your screen brightness lower, either to help your eyes or not bother someone else? It can be annoying have to tweak brightness settings all of the time. We'll show you how to set your brightness automatically during the night. Read on.

To start, you need to have a laptop or a display that supports software brightness configuration. You'll also need to make sure that your GNOME brightness settings are working. (KDE fan? Submit a relevant article.) Also, take note that if your system is not on when brightness settings change, they will not be updated.

Now, pop open a terminal to edit your crontab:

crontab -e

Now you'll want to add some time and brightness settings. Use this as a template:

0 22 * * * gconftool-2 --type int --set /apps/gnome-power-manager/backlight/brightness_ac 10
0 7 * * * gconftool-2 --type int --set /apps/gnome-power-manager/backlight/brightness_ac 100

The first line will set the brightness value to 10% at 22:00; the second sets it to full brightness at 07:00. Note that these are not hardware brightness values, but power manager values that scale from 0 to 100. You can add as many lines as you want. If you're proficient in your crontab syntax, then you can even use settings that only apply on weekends or weekdays.

Avatar for jacob Jacob Peddicord

Home » Articles »