Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Possible Duplicate:
How to change the shortcut to adjust brightness?

The brightness keys on my laptop are not recognized by Ubuntu, which is a common problem for a variety of laptops, is there a way to set an arbitrary key shortcut to change brightness in Ubuntu 12.04? I looked in the Keyboard settings app under the shortcut tab, and I couldn't find one.

I am able to set brightness in the Brightness and Lock settings app, but it would be much more convenient if I could just assign a key shortcut, like Ctrl+F2 and Ctrl+F3.

share|improve this question

marked as duplicate by Jorge Castro, Eliah Kagan, jokerdino, belacqua, Mitch Aug 17 '12 at 1:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 13 down vote accepted

This is a generic way to set arbitrary brightness up/down keys on Ubuntu 12.04 using the Keyboard settings app.

sudo apt-get install xdotool

Open "Keyboard" settings app, go to Shortcut tab, click Custom Shortcut, then the little + button to add a shortcut.

name: Brightness Up
command: xdotool key XF86MonBrightnessUp

and another:

name: Brightness Down
command: xdotool key XF86MonBrightnessDown

Click where it says "Disabled" and then hit the key-combo you want, I ended up using F2 and F3.

share|improve this answer
Doesn't appear to work for an Acer Aspire S3 on 12.04 with Fn+leftarrow/rightarrow. – Trevor Alexander Dec 9 '13 at 20:56
Doesn't appear to work for an out-of-box Toshiba Satellite S55-A5375 – Meredith Apr 27 '14 at 7:20
Worked for me on a Toshiba Satellite L305 laptop (which is 7 years old) – dreme Aug 26 '15 at 7:54
In Ubuntu 15.10 this only works if adding --clearmodifiers. I.e. the commands are: "xdotool key --clearmodifiers XF86MonBrightnessUp" and "xdotool key --clearmodifiers XF86MonBrightnessDown" – Kristofer Nov 28 '15 at 12:43
Worked on Acer C720 Chromebook booting with OpenSUSE – chaseadamsio Jun 7 at 3:35

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