0
rated 0 times
[
0]
[
0]
/ answers: 1 / hits: 364
/ 3 Years ago, sun, august 1, 2021, 2:34:22
I've written an Upstart job to automatically change display gamma according to change in display brightness:
start on (backlight-device-changed)
exec /usr/bin/gammach
And this is "gammach":
#! /bin/bash
Br=`cat /sys/class/backlight/acpi_video0/actual_brightness` # Display brightness
Gm=.$((((Br+76)%100))) # Corrected gamma according to brightness
xrandr --output LVDS --gamma $Gm:$Gm:$Gm
But every time i change brightness i receive this error in the log file:
Can't open display
I have tried xgamma, but received a similar error.
Any help appreciated. Thank you.
More From » brightness