From ArchWiki
Revision as of 15:55, 6 March 2019 by Francoism (talk | contribs) (→‎Autostart: Added plasma-applet-control instructions, remove gtk instructions as both listed options should redshift, applet may differ.)
Jump to navigation Jump to search

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.
Note: Redshift does not support Wayland since it offers no way to adjust the color temperature [1]. See Wayland#Gamma for more.


Install the redshift package. Alternatively, install the redshift-minimalAUR package, for a version with minimal dependencies.

Front ends

The redshift-gtk command comes with the redshift package and provides a system tray icon for controlling Redshift. See optional dependencies.

Alternatives are redshiftgui-binAUR (GTK) and redshift-qtAUR, redshiftconfAUR or plasma5-applets-redshift-control and plasma5-applets-redshift-control-gitAUR (Qt).


Redshift will at least need your location to start (unless -O is used), 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.

Quick start

To just get it up and running with a basic setup, issue:


where LATITUDE is the latitude and LONGITUDE is the longitude of your location.

Tip: You can get the coordinates of a place with

To instantly adjusts the color temperature of your screen use:

$ redshift -P -O TEMPERATURE

where TEMPERATURE is the desired color temperature (between 1000 and 25000).


There are several options to have redshift automatically started:

  • By using Systemd/User. Two services are provided: redshift.service and redshift-gtk.service. Activate only one of them depending on whether or not you want the system tray icon.
  • By placing a Redshift Desktop entry in ~/.config/autostart/ or by adding redshift to your window manager or desktop environment's Autostarting method.
Note: The Redshift service files contain Restart=always so they will restart infinitely. See systemd.service(5).

Redshift Plasma Applet Control

Make sure plasma5-applets-redshift-control has been installed and redshift.service has been disabled. Check Redshift Control under Configure System Tray... Afterwards use the context menu to open the Redshift Control Settings on the newly visible Redshift tray-icon, and enable the option Autostart.


Redshift reads the configuration file ~/.config/redshift/redshift.conf [2] if it exists. However, Redshift does not create that configuration file, so you may want to create it manually. See redshift.conf.sample.

Automatic location based on GeoClue2

In order to allow access Redshift to use GeoClue2, add the following lines to /etc/geoclue/geoclue.conf:


Restart redshift.service and/or any other Redshift instance to apply the changes.

  • This workaround is not needed with Geoclue2 version 2.5.0 and above.
  • If using GNOME, also toggle Location Services to "On" in Settings > Privacy.
  • Due possible bugs with geoclue2 and Redshift [3], it may be required to use the manual location-provider instead, e.g. for Paris:
; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.


; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
  • If using i3wm or similar, you will also need to enable the geoclue agent on startup. As well as systemctl --user enable redshift-gtk or redshift user service.
exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent

Automatic location based on GPS

You can also use gpsd to automatically determine your GPS location and use it as an input for Redshift. Create the following script and pass $lat and $lon to redshift -l $lat;$lon:

#gpsdata=$( gpspipe -w -n 10 |   grep -m 1 lon )
gpsdata=$( gpspipe -w | grep -m 1 TPV )
lat=$( echo "$gpsdata"  | jsawk 'return' )
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. [4]

Changing screen backlight is possible with redshift hooks and xorg-xrandr and xorg-xbacklight but, please see Backlight#xbacklight as there are some limitations and you may have to find another method of controlling the backlight depending on your hardware.

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:


# Set brightness via xbrightness when redshift status changes

# Set brightness values for each status.
# Range from 1 to 100 is valid
# Set fade time for changes to one minute

if [ "$1" = period-changed ]; then
	case $3 in
			xbacklight -set $brightness_night -time $fade_time
			xbacklight -set $brightness_transition -time $fade_time
			xbacklight -set $brightness_day -time $fade_time

Make it executable:

$ chmod +x ~/.config/redshift/hooks/

Restart the 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 does not work

Install libappindicator-gtk3. See redshift issue 363 and FS#49971.

Redshift makes the screen quickly flicker between the set color value of the screen and the default color value

Make sure there are not 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. If you do not use a display manager, edit the redshift.service user service and delete the After=display-manager.service line. 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 [5] and [6]. Set or create the string value

HKEY_CURRENT_USER\Software\Wine\X11 Driver

using the registry editor, or import/set it otherwise.

Redshift GDBus.Error:org.freedesktop.DBus.Error.AccessDenied on start

If running $ redshift and you are getting:

$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.

or running $ redshift-gtk and getting the similar error:

$ redshift-gtk
Failed to run Redshift
Trying location provider `geoclue2'...
Unable to start GeoClue client:
'redshift' disallowed, no agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.

You can create a systemd unit file in ~/.config/systemd/user/geoclue-agent.service with the following config:

Description=redshift needs to get a (geo)clue



Start and enable the service with systemctl: $ systemctl --user enable --now geoclue-agent.service and try running redshift again.

If you still get the same error, it may be because of geoclue being locked down to a few programs by default. Try adding the following lines to /etc/geoclue/geoclue.conf (see redshift issue 158 and FS#40360) and run $ redshift again:


See also