Difficulty: Instruction∅ Reading time: 17 minutes
Even under Linux you can do something for your eyes and use a night mode. Currently the feature is not yet integrated in Linux by default, but can be upgraded within a few moments.
In the following you will find a description with all necessary procedures (you can also find example configurations in this article).
Last updated: 16.03.2020
Content
Installing the free program Redshift, via the Linux console
Difficulty level:
Surely there are other methods, but for me so far the installation and setup of Redshift has been fully successful.
Before each installation, the Linux package lists should be updated, so that the newest program versions can be installed.
In the codebox you will find several commands for updating the package lists and the actual installation of Redshift. Optionally, you can do all the necessary steps in one command or do them one by one:
- Select"Update Linux package lists and install Redshift with taskbar icon", to carry out a complete installation
- When selecting"Update Linux package list", you will see the command to update the Linux package sources
- The command to install only the base tool (fully functional, but without the taskbar icon) is displayed when you select"Redshift basic tool"
- By selecting"Redshift with taskbar icon", the command is displayed to install the basic tool incl. of an icon in the taskbar that can be used to quickly turn Redshift on and off manually
But before we can use Redshift, we have to tell the program when to set which color temperature. The settings can be given to the program as single parameters or in form of a complete configuration file.
Configure Redshift quickly and easily via the terminal | with ready-made configuration templates
difficulty:
/.config/redshift.conf )
Afterwards Redshift is started with the following command (adapt path!):
redshift -c /home/user/.config/redshift.conf
In this section I explain how to set up Redshift using a manually created config file. This offers two advantages from my point of view:
You can adjust several settings at once
you can simply copy one of the config files provided here into your system and Redshift is immediately ready to use
The config file will be located below the jew. user folder, in the folder ".config" created. As file name we use "redshift.conf".
The following configuration templates are based on the manufacturer’s original configuration settings, but have been translated and slightly modified for the German-speaking world. Just choose a configuration using the preceeding description and use it to create your own config file for Redshift.
; Redshift- Configuration | german | basic settings | manual location
; lines preceded by a semicolon are comment lines
; and are not implemented by Redshift. So you can use certain
; Easily enable/disable settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[redshift]
;;;;;;;;;; Set color temperatures for day and night: ;;;;;;;;;;
; default values: temp-day=5700 | temp-night=3500
;;;;;;;;;; Soft/hard transition for day/night change: ;;;;;;;;;;
; 0 the change between day and night will be done in a short moment.
; 1 the color temperature is changed in several steps,
; so that the transition is not so noticeable.
;;;;;;;;;; Defining the location utility: ;;;;;;;;;;
; The manual settings for the location
; are then made in the following section.
;;;;;;;;;; Configuration of manual location data: ;;;;;;;;;;
; lat= latitude
; lon= longitude
; longitude (lon) west of Greenwich (z.B. for America)
; must have negative number values.
;;;;;;;;;; Set method for conversion: ;;;;;;;;;;
; ‘randr’ is the preferred method, ‘vidmode’ is older but can be
; will work in some cases, where ‘randr’ does not.
;; Frankfurt am Main ;;;
; Redshift configuration | german | basic settings | with automatic location detection for mobile devices
; lines preceded by a semicolon are comment lines
; and are not implemented by Redshift. This is how you can set certain
; easily enable/disable settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[redshift]
;;;;;;;;;; set color temperatures for day and night: ;;;;;;;;;;
; default values: temp-day=5700 | temp-night=3500
;;;;;;;;;; Soft/hard transition for day/night change: ;;;;;;;;;;
; 0 the change between day and night is done in a short moment.
; 1 the color temperature is changed in several steps,
; so that the transition is not so noticeable.
;;;;;;;;;; Specifying the location utility: ;;;;;;;;;;
; The location is determined automatically
;;;;;;;;;; Set method for transition: ;;;;;;;;;;
; ‘randr’ is the preferred method, ‘vidmode’ is older but can be
; work in some cases where ‘randr’ does not.
; redshift- configuration | german | detailed settings
; lines preceded by a semicolon are comment lines
; and are not implemented by Redshift. So you can set certain
; easily enable/disable settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[redshift]
;;;;;;;;;; Set color temperatures for day and night: ;;;;;;;;;;
; default values: temp-day=5700 | temp-night=3500
;;;;;;;;;; Soft/hard transition at day/night change: ;;;;;;;;;;
; 0 the change between day and night is done in a short moment.
; 1 the color temperature is changed in several steps,
; so that the transition is not so noticeable.
;;;;;;;;;; Adjust screen brightness (default value: 1.0): ;;;;;;;;;;
; Use these options only if the normal gradation of the
; screen brightness to be fine-tuned
; brightness=0.9
; since Redshift 1.8 can have different brightnesses
; can be set for day and night
;brightness-day=0.7
;brightness-night=0.4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; either set for all colors together:
gamma=0.8
; or for each color channel separately:
;gamma=0.8:0.7:0.8
; Since Redshift 1.10 this can be set separately for day/night:
; for all colors together:
; gamma-night=0.6
; for each color channel separately:
;gamma-day=0.8:0.7:0.8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;; Set the location utility: ;;;;;;;;;;
; Z.B.: ‘geoclue’, ‘geoclue2’, ‘manual’
; With the command: ‘redshift -l list’ all the
; currently available on the device displayed.
; The manual settings for location detection
; are then done in the following section.
;;;;;;;;;; Configuration of manual site data: ;;;;;;;;;;
Use ‘redshift -l PROVIDER:help’ to display more information
; Example: ‘redshift -l manual:help’ shows info
; to configure the manual location data to.
; lat= latitude
; lon= longitude
; longitude (lon) west of Greenwich (z.B. for America)
; must have negative number values.
;;;;;;;;;; Set method for changeover: ;;;;;;;;;;
; Z.B.: ‘randr’, ‘vidmode’
; With the command: ‘redshift -m list’ all the
; options currently available on the device are displayed.
; ‘randr’ is the preferred method, ‘vidmode’ is older but can be used
; may work in some cases where ‘randr’ does not.
;;;;;;;;;; Configuring the switching method: ;;;;;;;;;;
; The command: ‘redshift -m METHOD:help’ displays further info
; example: ‘redshift -m randr:help’ displays information
; to configure the randr method on.
; In the following randr is set to switch monitor "1.
; Attention!! The monitor numbering starts at "0,
; therefore monitor 1, is the 2.Screen.
; To switch all monitors equally,
; disable the settings here.
Now that Redshift is set up, it can be started manually using the following command: redshift -c /home/user/.config/redshift.conf. But Redshift should be added to the autostart, so that the night mode is always active, resp. is on hold.
Set up Redshift to start the blue filter/night mode automatically with the system | on Linux Mint
difficulty level:
In the Linux MX start menu, type the word "start"; then select the "Session and Startup Behavior" menu item.
In the window that opens, select the "Automatically started applications" tab to manage the programs that are started when you log on to the system.
If the taskbar icon for Redshift was installed, the tool is already displayed in the list of applications. But to make sure that Redshift is always started with our individual configuration, we have to add it again. To do this, click the "Add" button and fill in at least the "Name" and "Command" fields (see figure x.3).
To simplify things, here are the entries from the screenshot to copy (path for redshift.check and adjust conf!):
name:
night mode: Redshift – blue filter
Description:
Start Redshift on logon
Command:
redshift -c /home/user/.config/redshift.conf
If a lot of other programs are loaded during the login or. if the device is slow, it may be a good idea to make use of the startup delay offered by Linux Mint.
By clicking OK, the process is completed and all open windows can be closed as well. Redshift is now started every time the current user logs in and activates night mode, resp. Blue filter, if the requirements of the config file are given.
set up Redshift so that the blue filter/night mode is automatically started with the system | on Linux MX
Difficulty level:

In the Linux MX start menu, type the word "start"; then select the "Session and startup behavior" menu item.
In the window that opens, select the tab "Automatically started applications" to manage the programs that are started when logging on to the system.
If the taskbar icon for Redshift was installed, the tool is already displayed in the list of applications.

But to make sure that Redshift is always started with our individual configuration, we have to add it to. To do this, click on the button "Add" and fill in at least the fields "Name" and "Command":

For convenience, here are the entries from the screenshot to copy (path for redshift.conf check and adjust!):
By clicking OK, the process is completed and all open windows can also be closed. Redshift is now started every time the current user logs in and activates night mode, resp. Blue filter, if the conditions of the config file are given.