Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to hotkey certain often used brightness settings under ctrl+ F7 through F10. I can already change it with the therminal. To be able to do this I ran the following command

chmod 666 /sys/class/backlight/intel_backlight/brightness

After that I was able to change it with

echo <value I want> > /sys/class/backlight/intel_backlight/brightness

(You might need to change "intel_backlight" to whatever vendor you have.)

After that worked I went to "System Settings -> Keyboard -> Custom Shortcuts" and added a custom shortcut with the following values

Name = lowest brightness

Command = echo 1 > /sys/class/backlight/intel_backlight/brightness

and I set it run with ctrl + F7 but when I press ctrl + F7 nothing happens (

cat /sys/class/backlight/intel_backlight/brightness 

outputs the same value it had before pressing ctrl + F7)

Making a little script that executes these commands and setting that to a hotkey also didn't work (executing it with a therminal did work)

How do I fix this?

ps. my grub file has one a little alteration to make the brightness function keys work.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor dell_laptop.backlight=0"

but I can't use the function keys to reach the desired values

share|improve this question
up vote 0 down vote accepted

Never mind, I'm an idiot I forgot the shortcuts don't support bash script I changed my command value to

bash -c "echo &#60;value I want&#62; > /sys/class/backlight/intel_backlight/brightness"

That worked.

ooh well. this might still be useful to for some other people.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.