Skip to content

Small C program to alter screen brightness on my laptop.

License

Notifications You must be signed in to change notification settings

c00k133/backlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brightness

This is a small C program to change the brightness on my laptop (HP EliteBook 820 G1).

It changes the brightness by modifying the brightness file under /sys/class/backlight/intel_backlight/, so if you are using anything else this will probably not work for you.

Before I used a bash script for changing the brightness - can be found under the folder script/ - however I could not set the SUID bit with root as owner as this is prohibited for shebang (#!) scripts under Ubuntu. This program circumvents that restriction.

Just run make install to:

  • compile the program
  • change the owner to root
  • change the permission accordingly - 4754
  • move the new file to /usr/bin/bright
    • if the file already exists, it will not be overwritten, the program will simply compile and nothing else - equivalent to simply running make.

DISCLAIMER: I did not write the bash script myself, however, I cannot remember from where I got it from. I am keeping it for reference.

About

Small C program to alter screen brightness on my laptop.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published