![]() ![]() In there click on the Shortcuts tab.Īt the bottom of the list there's a plus (+) button. Assuming that you're using Unity, the default Ubuntu Desktop interface, you just need to open System Settings and click on the Keyboard icon. Now for the final touch, adding keyboard controls. # It will make the monitor much darker Step 3 - keyboard shortcuts You can now step the brightness up and down using our script. Now let's make it executable: $ sudo chmod +x /usr/local/bin/brightness HIDDEV=`acdcontrol -detect /dev/usb/hiddev* | grep -Po "/dev/usb/hiddev"` Put the following code into a new file /usr/local/bin/brightness #!/bin/bash However, you need to always give it the hiddev device your monitor uses to talk to your computer which may change on each boot. Part 2 - writing a script to step through the brightnessĪcdcontrol has a way of doing step changes to your brightness, essentially allowing you to increase and decrease the brightness. If nothing is detected you will not be able to control the monitor brightness. See the part I put in bold type, /dev/usb/hiddev1? It may be different for you. Vendor= 0x5ac (Apple), Product=0x9226[Apple Cinema HD Display 27" dev/usb/hiddev1: USB Monitor - SUPPORTED. It should reply with something like Apple Cinema and Studio Display Control Program. Now run the following: acdcontrol -detect /dev/usb/hiddev* If you have a Thunderbolt display plugged into a Mini DisplayPort only port you're out of luck, sorry. If you have a Thunderbolt display make sure that it's plugged into a Thunderbolt port. The brightness control, just like the iSight camera and audio input/output, is sent to your display over USB. Make sure that your display's USB cord is plugged in to your computer. Sudo chmod 0755 /usr/local/bin/acdcontrolĮither way, we can now test that acdcontrol works. Sudo chown root:users /usr/local/bin/acdcontrol In this case you need to use the alternative method, having acdcontrol always run as root: sudo cp acdcontrol /usr/local/bin If you are on a multi-user system and your users don't belong in a common group the previous method won't work. Now copy acdcontrol somewhere in your PATH, e.g. Remember that you may also need to unplug your monitor's USB or Thunderbolt connector from your computer and then plug it right back in for these changes to take effect. Next up, we tell the kernel that our udev rules have changed: sudo udevadm control -reload-rules If you are not sure what this is run id -gn on your terminal. Obviously this will be different for you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |