Linux Mint brightness adjustment-xrandroid command Learning

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.