Saturday, May 4, 2024
61
rated 0 times [  61] [ 0]  / answers: 1 / hits: 94790  / 2 Years ago, sun, april 24, 2022, 2:55:08

I am controlling my PC with SSH and scripting. How can i change the brightness, color and sharpness from command line?



Try 1: failed



$ sudo redshift -t 5000:5000 -g .5
Cannot list GNOME panel applets.
Initialization of gnome-clock failed.
Trying next provider...
Latitude and longitude must be set.


Try 2: failed



$ cat brightness 
20
$ cat max_brightness
20
$ echo 1 | sudo tee /sys/class/backlight/acpi_video0/brightness
1
$ echo 20 | sudo tee /sys/class/backlight/acpi_video0/brightness


Any alternative way to do?



Follow up: http://jonls.dk/redshift/



[command]     [1000K to 10000K]       [effects 0.1 to 10.0]
| | / / /
^ ^ ^ ^ ^
redshift -t 1000:1000 -l 0:0 -g .1; Dark
redshift -t 1000:1000 -l 0.0 -g 5; Bright

More From » command-line

 Answers
3

If the driver of your graphics card supports it, then you can use xrandr.



The following command lists the current configuration:



xrandr --current --verbose


If you want to change the configuration of an output, then you need the name of the output. This name is part of the output of xrandr --current, for example LVDS1.



The brightness can be changed like this:



xrandr --output <outputname> --brightness 0.8


Gamma (red:green:blue):



xrandr --output <outputname> --gamma 0.5:1.0:1.0

[#43423] Monday, April 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jectedrin

Total Points: 491
Total Questions: 105
Total Answers: 111

Location: Netherlands
Member since Mon, Jun 7, 2021
3 Years ago
;