Linux Mint brightness adjustment-xrandroid command Learning
Today, I was asked to adjust the screen height, but I have never been concerned about this problem. Now I am trying it in Linux Mint. After a variety of methods, what will take effect is the mission of using xrandroid.
The xrandroid man document explains the following:
Primitive command line interface to randroid extension
"Randroid extension under the original command line"
But what is randroid? The definition of Wiki is as follows:
RandR (“resize and rotate”) is a communications protocol written as an extension to the X11 and Wayland protocols for display servers.
Randroid is a protocol used to adjust the display.
The most basic purpose of xrandroid is to adjust the resolution of the display. After you enter xrandroid, the status of all displayed devices and supported resolutions are listed. You can use the-s parameter to set the desired resolution. In Linux, use the xrandroid command to set the screen resolution.
To set the screen brightness, follow these steps:
Enter xrandroid to view the display devices in the connected status in the output, such as LVDS. The specific command can be:
xrandr | grep -v disconnected | grep connected
Adjust brightness:
xrand --output LVDS --brightness 0.5
Note: The parameters after output are the display devices found in the previous step. The results of different hosts may be different. The parameter range after brightness is 0-1, 0 is black, and 1 is the brightest.
Finally, write this common function as a script:
#! /bin/bashif [ $# -ne 1 ] ; then echo "Usage: setbrightness <0.0-0.1>" exit 1fixrandr --output LVDS --brightness $1
All users have the following execution permissions:
chmod a+x setbrightness
Move to the application directory for direct use:
mv setbrightness /usr/local/bin
Now you can directly set the brightness of the monitor!
This article permanently updates the link address: