Adjust brightness of LCD on Armbian Desktop with 1 click - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32) +---- Forum: LCD and Touch Panel (https://forum.pine64.org/forumdisplay.php?fid=37) +---- Thread: Adjust brightness of LCD on Armbian Desktop with 1 click (/showthread.php?tid=4438) |
Adjust brightness of LCD on Armbian Desktop with 1 click - JulianM - 04-02-2017 Hello together! I figured out how to adjust the bightness of the LCD with just 1 click on desktop with Armbian. It's really not a big thing, but maybe some "newbies" may like this Thanks to pfeerick for his topic about LCD Support on Linux! Step #1: Create the script. (Replace "YourUserName" with your username ) Code: nano /home/YourUserName/brightness.sh Code: #!/bin/bash Code: chmod +x /home/YourUserName/brightness.sh Step #2: Using GPIO to increase/decrase. Execute these commands as ROOT user! Code: nano /home/YourUserName/gpio-brightness.sh Code: #!/bin/bash Code: chmod +x /home/YourUserName/gpio-brightness.sh Code: (crontab -l ; echo "@reboot /bin/bash /home/YourUserName/gpio-brightness.sh")| crontab - Step #3: Change sudoers settings Execute these commands as ROOT user! Code: visudo Add the following code to the end of the file: Code: YourUserName ALL=NOPASSWD: /home/YourUserName/brightness.sh Step #4: Add an icon to the taskbar (XFCE). • Right click on the taskbar. • Add a new element. • Add a new "Launcher". • Close the window and right click on the new launcher => Properties. • Click on the right side "Create new object" • Enter a custom Name for your Icon. • Enter the command: sudo /home/YourUserName/brightness.sh • You may set a icon. • Create. Step #5: Now reboot your Pine64 and you're done! Now you're able to change the brightness of the LCD with just 1 click! It's nothing big as I already said Best regards Julian |