This is a minimal C codebase that compiles to an executable with which the brightness of laptop screens can be controlled on Linux.
make
As root, adjust paths appropriately for the Linux distribution used:
cp backlightcontrol /usr/bin
chmod u+s /usr/bin/backlightcontrol
backlightcontrol set 50
backlightcontrol increment 10
backlightcontrol decrement 10