security offer from FOSS Post

Looking to the default blue light emitted by computers all the time is not recommended; as it leads to eye strain and other health issues. You will notice this the most if you try to use your computer at night, and you will get blinded by the strong bright blue light coming out of it.

Night light is a layer that replaces part of the blue light emitted by computer monitors at night with red light, so that they become more comfortable to the human eye to work with, especially at night.

Redshift is a software that enables night light on Linux. It is free and open source, and works on almost all Linux distributions.

You can easily install the software and use it on your distribution, which is what we’ll explain in this article.

Note: Some desktop environments like GNOME or KDE have their own built-in night light feature support in their settings / control centers, so just check them up from there and use them instead of installing Redshift on them, because they are better.

Getting Night Light on Linux with Redshift

Installing Redshift

For Debian, Ubuntu, or other Linux distributions based on any of them, simply run the following commands in the terminal in order to install the software:

sudo apt install redshift redshift-gtk

For Fedora:

sudo dnf install redshift

For other distributions, just search for the redshift package in your package repositories and install it.

Redshift Configuration File Tweaking

You have to open the file at the /home/<your_username>/.config/redshift.conf (or create it if it doesn’t exist), and place the following contents inside it:

[redshift]
; Set the day and night screen temperatures
temp-day=3350
temp-night=3350
fade=1
location-provider=manual

[manual]
lat=48.1
lon=11.6

[randr]
screen=0

Let’s start explaining each line in the Redshift configuration file:

  • temp-day is the color temperature required for the display in the day time.
  • temp-night is the color temperature required for the display in the night time.
  • fade is just to make the change from one temperature to another (when it happens) gradual and not sudden.
  • location-provider=manual this is to tell Redshift that we want to enter our current location manually, so that the software later can know the sunrise and sunset times by itself according to the latitude and longitude information we enter.
  • lat is our current location’s latitude.
  • lon is our current location’s longitude.
  • [rander] screen=0 is to tell Redshift which monitor we want to apply the night light on (counting starts from 0). If you remove these two lines, then the software will apply night light to all monitors you have connected to your computer.

For me, I like to use night light all the time, because it makes my eyes more comfortable, especially because I work for 14 hours a day on it. But for you, you can choose to set a different color temperature for night time and day time. You can browse the list of possible color temperatures from this Wikipedia page or just see this table for how they would look like:

Pasted image 0

For latitude and longitude information, just use a service like Google Maps or others to get them for your current location like this picture:

2022-12-28 18-47

Just save the file and exit.

Enabling Night Light with Redshift

Now that we have our configuration file ready, we just have to launch the software.

Simply search for “Redshift” in your applications menu and launch it:

Pasted image 0

Your screen will start transitioning to the color temperature you specified in the Redshift configuration file. You will also notice that there is a system tray icon now started for Redshift program:

Pasted image 0

Just make sure that both the “Enabled” and “Autostart” options are toggled in the system tray icon.

You can modify the color temperatures according to your needs however you like, and then restart the software for changes to take effect. (Note: Toggling the “Enable” button from the Redshift system tray icon will not cause changes to take place, you have to exit the software and start it again in order for changes to become effective).

That’s all you need.

Conclusion

Night Light is an important feature to look for in any Linux desktop. It helps you avoid eye strain and other related health issues, so it’s important to check it up and enable it wherever possible (even on your mobile phone if you can).

Luckily, the steps for enabling Redshift on Linux are quite straightforward and easy, and do not require a lot of work as we explained. It is a very nifty thing one enables but may have a huge impact on one of the most precious parts in his/her body: The eyes.

Other desktops like GNOME or KDE may have built-in night light as we explained, so you may not need to use or install Redshift on them. You can just use the built-in night light feature if you wish to have it.

security offer from FOSS Post
Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Newsletter

Enter your email address to subscribe to our newsletter. We only send you an email when we have a couple of new posts or some important updates to share.

Recent Comments

Open Source Directory

Join the Force!

For the price of one cup of coffee per month:

  • Support the FOSS Post to produce more content.
  • Get a special account on our website.
  • Remove all the ads you are seeing (including this one!).
  • Get an OPML file containing +70 RSS feeds for various FOSS-related websites and blogs, so that you can import it into your favorite RSS reader and stay updated about the FOSS world!