How to adjust the brightness of the screen on a Linux system computer

Source: Internet
Author: User
Tags require arch linux

Let's look at a general approach

Note: The following actions do not require sudo administrator rights, with the current user action.

1. Open a terminal to view the maximum brightness value of the machine.

Enter command:

The code is as follows:

Cat/sys/class/backlight/acpi_video0/max_brightness

The output displays a number. For example, the small series is 15. As pictured.

Note: If it is a dual graphics card, then there are video1 and intel_backlight directories, each of which has max_brightness and actual_brightness, indicating maximum brightness and actual brightness/sys/class/backlight/. The default is generally used under Video0.

2. Open the text editor. It's usually gedit or Pluma. Copy the following lines of code into a text editor and save it as. mybrt.sh. Note that the file name is a hidden file with a. Beginning. The meaning of this code is to set the brightness to 7. Before we looked at the maximum brightness is 15, so set to 7 already very good. Of course you can modify this number for your favorite brightness values.

The code is as follows:

#!/bin/sh

#change brightness setting on startup or resume

Pkexec/usr/lib/gnome-settings-daemon/gsd-backlight-helper--set-brightness 7

As pictured.

3. Add execution properties for the. mybrt.sh file. Open the terminal and enter the command: chmod +x. mybrt.sh. As pictured.

4. Set the power-on login auto Run brightness script (that is, the newly-built one, mybrt.sh), so that each boot can be restored to the brightness we need. Enter the command in the terminal:

The code is as follows:

Gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/home/who/.mybrt.sh"

< p>

Note: Replace who with your username. As shown in figure

After this setting, your notebook computer whether to restart, logout or close the screen, standby, and so on, once you enter the desktop, the screen brightness will automatically restore for us to set a good brightness value. This method is simple and does not require installing additional software or modifying the system configuration file.

It is noteworthy that this approach is only valid for Linux systems that use the GNOME3 desktop environment, such as Ubuntu11.04 later versions, Linuxdeepin12.06, Linuxmint13 Cinnamon editions, and so on. The Linuxmint13 mate version is invalid.

Software that automatically adjusts the brightness of the screen

Calise

In the development of intermittent time, calise means "camera light sensor (Camera Light Sensor)". In other words, it is an open source program that calculates the best backlight level on the screen based on the light intensity received by the camera. Further, Calise can consider the weather in your area based on your geographic coordinates. I like it because it's compatible with every desktop, not even the X series.

It comes with a command-line interface and a graphical interface, supports multiuser configuration, and can even export data to CSV. After installation, you must quickly correct it before witnessing a miracle.

What's not really like is that if you're as paranoid as I am, it's unfortunate that you put a piece of tape in front of your camera, which can greatly affect the accuracy of calise. In addition, Calise is a great application, worthy of our attention and support. As I mentioned earlier, it has undergone a patchy and difficult period in the past few years, so I really hope that this project will go on.

Redshift

If you want to reduce the pressure on the eye caused by the screen, you probably have heard of F.lux, a free proprietary software that modifies the brightness and color of the display based on the time of day. However, if you really prefer open source software, an alternative scenario is: redshift. Inspiration from F.lux,redshift can also change the color and brightness to enhance your experience of sitting in front of the screen at night. At startup, you can use latitude and longitude to configure geographic coordinates, and then you can make it run in a tray. The redshift will adjust your color or screen smoothly according to the position of the sun. At night, you can see that the color temperature of the screen is tuned to the warm side, which will make your eyes less guilty.

Like Calise, it provides a command-line interface and also provides a graphical client. To quickly start redshift, simply use the command:

The code is as follows:

$ redshift-l [Lat]:[lon]

Replace [Lat]:[lon] for your dimension and longitude.

However, it can also enter your coordinates through the GPSD module. For Arch Linux users, I recommend that you read this wiki page.

Related Article

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.