Compilation
You can skip this section if you are experienced, as you won't find anything new here.
First, we need to purge the old version from the system.
When compiling, I always purge instead of removal, because usually, some paths will change.
sudo apt-get purge redshift redshift-gtk
Then, we prepare for the compilation. Luckily, in this case, it can be done simply with:
sudo apt-get build-dep redshift-gtk
probably because the dependencies did not change since the last packaged version.
Now, we need the source code, I always create a new folder for a compiled program, so:
mkdir redshift && cd redshift
Followed by the download of the source code:
wget https://github.com/jonls/redshift/releases/download/v1.12/redshift-1.12.tar.xz
And unpacking the archive, while, again, going directly into the created directory:
tar -xJf redshift-1.12.tar.xz && cd redshift-1.12
Let's run configure script with appropriate switches:
./configure # --enable-gui --enable-ubuntu
On a side note, while the --enable-gui was enabled by default, it did not enable the --enable-ubuntu by default on my Linux Mint, which I believe it should. However, I see no difference, anyways. So, the default configuration is probably ok.
Just compile it then:
make
Configuration
You will have to manually create the configuration directory as it's moved in this version, though falling back in case the directory does not exist:
mkdir ~/.config/redshift
Use your favorite text editor to create and edit the config file, I will use VS Code here:
code ~/.config/redshift/redshift.conf
Example config file heavily commented.
; Global settings file for Redshift application.
[redshift]
; The location provider for solar elevation.
; ------------------------------------------------------------------------------
; Set the location-provider: 'geoclue2' or 'manual'.
; The actual provider settings are in a separate section.
location-provider=manual
; Smooth fade between temperatures when Redshift starts and stops.
; ------------------------------------------------------------------------------
; - 0 will cause an immediate change between screen temperatures.
; - 1 will gradually apply the new screen temperature over a couple of seconds.
fade=0
; Solar elevation thresholds.
; ------------------------------------------------------------------------------
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn / dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6
; Day and night screen temperatures.
; ------------------------------------------------------------------------------
; Default temperatures:
; - Day time : 6500K
; - Night time: 4500K
temp-day=6000
temp-night=4500
; Custom dawn / dusk times.
; ------------------------------------------------------------------------------
; Instead of using the solar elevation, the time intervals of dawn and dusk can
; be specified manually. The times must be specified as HH:MM in 24-hour format.
dawn-time=00:00
dusk-time=15:00
; The adjustment method: 'randr', 'vidmode'.
; ------------------------------------------------------------------------------
; This has changed since the 1.12 version in favor of randr
; formerly vidmode has mostly been used from what I read.
adjustment-method=randr
; Manual GPS of the location for solar elevation.
; ------------------------------------------------------------------------------
; Standard longitude and latitude coordinates.
[manual]
lat=00.8111306
; EDIT THIS ^^
lon=00.1414300
; EDIT THIS ^^
; Adjustment method settings.
; ------------------------------------------------------------------------------
; Note that the numbering starts from 0, so 1 is actually the second screen.
; This actually works for all monitors, needs clarification!
[randr]
screen=0
Installation
I recommend trying out the compiled version before actually installing it.
For some reason, the compiled GTK binary is not made executable, so to try it out:
chmod u+x ./src/redshift-gtk/redshift-gtk
./src/redshift-gtk/redshift-gtk
If it works well, then install it with:
sudo make install