From the Redshift project web page:
- Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. This program is inspired by f.lux.
- 1 Installation
- 2 Configuration
- 3 Troubleshooting
- 3.1 Screen 1 could not be found
- 3.2 Left/right clicking the tray icon doesn't work
- 3.3 Redshift makes the screen quickly flicker between the set color value of the screen and the default color value
- 3.4 Redshift works fine when invoked as a command but fails when run as a systemd service
- 3.5 Redshift temporarily resets using some wine apps that reset gamma values
- 4 See also
Install the package. Alternatively, install the AUR package, for a version with minimal dependencies.
redshift-gtk command is provided by the package. Redshift-GTK provides a system tray icon for controlling Redshift and requires the following packages to be installed: , , and .
Another GTK application isAUR and alternative Qt solutions available are AUR, AUR or AUR.
Redshift will at least need your location to start, meaning the latitude and longitude of your location. Redshift employs several routines for obtaining your location. If none of them works (e.g. none of the used helper programs is installed), you need to enter your location manually.
Redshift reads the configuration file
~/.config/redshift/redshift.conf, if it exists. However, Redshift does not create that configuration file, so you may want to create it manually. See redshift.conf.sample.
To just get it up and running with a basic setup, issue:
$ redshift -l LAT:LON
where LAT is the latitude and LON is the longitude of your location.
To instantly adjusts the color temperature of your screen use:
$ redshift -O TEMP
where TEMP is the desired color temperature (between 1000 and 25000).
There are several options to have redshift automatically started:
- By using a systemd user unit. Two services are provided:
redshift-gtk.service. Activate only one of them depending on whether or not you want the system tray icon.
- By adding a shell script with the contents
redshift &> /dev/null &in
/etc/X11/xinit/xinitrc.d/, and then make it executable with
chmod +x script_name.sh.
- By adding
pgrep redshift &> /dev/null || redshift &> /dev/null &to
~/.xinitrcif you are using
- By right-clicking the system tray icon when Redshift-GTK or plasma5-applets-redshift-control is already launched and selecting 'Autostart'.
- By using your preferred window manager or desktop environment's autostart methods. For example in i3, the following line could be added to the config file:
exec --no-startup-id redshift-gtk. On other desktop environments, Desktop entries inside
~/.config/autostartcan be used.
Restart=alwaysso the service will restart infinitely (see ).
Automatic location based on GeoClue2
In order to allow access Redshift to use GeoClue, add the following lines to
[redshift] allowed=true system=false users=
redshift.service and/or any other Redshift instance to apply the chances.
Automatic location based on GPS
You can also use GPS location and use it as an input for Redshift. Create the following script and pass
redshift -l $lat;$lon:
#!/bin/bash date #gpsdata=$( gpspipe -w -n 10 | grep -m 1 lon ) gpsdata=$( gpspipe -w | grep -m 1 TPV ) lat=$( echo "$gpsdata" | jsawk 'return this.lat' ) lon=$( echo "$gpsdata" | jsawk 'return this.lon' ) alt=$( echo "$gpsdata" | jsawk 'return this.alt' ) dt=$( echo "$gpsdata" | jsawk 'return this.time' ) echo "$dt" echo "You are here: $lat, $lon at $alt"
For more information, see this forums thread.
Use real screen brightness
Redshift has a brightness adjustment setting, but it does not work the way most people might expect. In fact it is a fake brightness adjustment obtained by manipulating the gamma ramps, which means that it does not reduce the backlight of the screen. 
Changing screen backlight is possible with redshift hooks and Backlight#xbacklight as there are some limitations and you may have to find another method of controlling the backlight depending on your hardware.and but, please see
You need to create a file in
~/.config/redshift/hooks and make it executable. You can use and edit the following example:
$ mkdir -p ~/.config/redshift/hooks
Create and adjust the following script:
#!/bin/sh # Set brightness via xbrightness when redshift status changes # Set brightness values for each status. # Range from 1 to 100 is valid brightness_day="100" brightness_transition="50" brightness_night="10" # Set fade time for changes to one minute fade_time=60000 case $1 in period-changed) case $3 in night) xbacklight -set $brightness_night -time $fade_time ;; transition) xbacklight -set $brightness_transition -time $fade_time ;; daytime) xbacklight -set $brightness_day -time $fade_time ;; esac ;; esac
Make it executable:
$ chmod +x ~/.config/redshift/hooks/brightness.sh
redshift.service to apply changes.
Check the service status as it should not contain the following message:
redshift[..]: No outputs have backlight property
Screen 1 could not be found
Locate configuration-file "redshift.conf" in your distribution and change "screen 1" to "screen 0"
Left/right clicking the tray icon doesn't work
Redshift makes the screen quickly flicker between the set color value of the screen and the default color value
Make sure there aren't multiple instances of redshift running.
Redshift works fine when invoked as a command but fails when run as a systemd service
The systemd unit has a line in the
redshift.service file that makes the service wait until the
display-manager.service unit is started by a Display Manager before the unit will invoke
redshift. In lightweight setups, such as i3, one often uses a Window Manager or no manager at all and thus the
display-manager.service is never started. Delete the line:
redshift.service file and run:
# systemctl --user daemon-reload
and the service should initialize properly.
Redshift temporarily resets using some wine apps that reset gamma values
If you notice that using some wine apps, redshift seems to reset temporarily upon launch, or adjusting settings, or etc, then there is a useful registry key that seems to alleviate this. See  and . Set or create the string value
using the registry editor, or import/set it otherwise.
- AUR || AUR