Redshift

From Gentoo Wiki
Jump to:navigation Jump to:search
Resources
Warning
Keep in mind, that at the time of writing (08 January 2023), the upstream project seems dead. The alternative is the gammastep project. The package for it is x11-misc/gammastep.

Redshift is an automatic color temperature adjustment to help reduce monitor eye strain induced by working in low-light conditions. Depending on the location (longitude and latitude) of the user's computer system, Redshift will change the color of the screen from the default bluish color to a orange/reddish color during evening hours, and then back again to bluish tint during daylight hours.

Installation

USE flags

USE flags for x11-misc/redshift A screen color temperature adjusting software

appindicator Build in support for notifications using the libindicate or libappindicator plugin
geoclue Control dependency on app-misc/geoclue
gtk Add support for x11-libs/gtk+ (The GIMP Toolkit)
nls Add Native Language Support (using gettext - GNU locale utilities)

Emerge

After setting necessary USE flags, install Redshift:

root #emerge --ask x11-misc/redshift

Configuration

Files

A configuration file can be created in each users home directory at ~/.config/redshift.conf

In order for Redshift to start, it will require longitude and latitude information inside the configuration file.

user $redshift -l manual:help

Saving lon/lat

Redshift can be quickly established in working order by adding correct location information into the configuration file. Lat/Lon values can be found searching for the closest city or region at Wikipedia or with a map service such as OpenStreetMap.

When using OpenStreetMap, simply search for the location. When it appears on the map tiles click the Export button (should be near the top left). The center of the displayed tiles will be the exact Lat/Lon location. The Lat value is the second number from the end displayed in the URL. The Lon value is the last number on the end.

A finished .conf file will look something like this:

FILE ~/.config/redshift/redshift.conf
[redshift]
location-provider=manual

[manual]
lat=47.6587803
lon=-117.4260466

Service

OpenRC

Redshift does not currently include an OpenRC init script.

systemd

user $systemctl --user enable redshift.service
user $systemctl --user start redshift.service

Usage

Invocation

user $redshift -h

Troubleshooting

No display manager

When not using a Display manager, users may encounter a similar error in the output of systemctl --user status redshift

user $systemctl --user status redshift

To verify this, simply issue redshift in a terminal. If redshift starts up correctly, then this is likely the issue.

There are a couple simple solutions to this problem:

  1. Install and use a Display manager
  2. Add redshift & to the user ~/.xinitrc file