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.

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

1 Answer 1

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
    
Do not forget to mark your answer as the correct answer. –  NikTh Aug 24 '13 at 22:58
    
I know. but it says: "you can accept your own answer in 2 days" –  Arno van der Weijden Aug 24 '13 at 23:13
    
I know that too, so I said "Do not forget" ;) –  NikTh Aug 24 '13 at 23:58

Your Answer

 
discard

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.