ddccontrol allows controlling external monitor brightness on Linux. It requires sudo
to use, though, and various workarounds made no difference on my (Debian) machine. This repo attempts to fix this problem with:
- A daemon that runs as
root
, typically undersystemd
, accepting commands over a domain socket - A client that does not run as
root
sending commands to this domain socket
The commands in question each use a single byte representing a brightness or contrast setting, along with the value to be set. No other data is passed in, so there's little to no risk of escalation/RCE.
cd path/to/ddccontrold
cargo install --path .
cp dccontrold.service /etc/systemd/system/ddccontrold.service
# Server - systemd
sudo systemctl start ddccontrold
sudo systemctl enable ddccontrold
# Server - direct
ddccontrold --mode server
# Client
ddccontrold --brightness <value>
ddccontrold --contrast <value>