Does redshift need an active internet connection to work?

Update: Please note that a fix is now on its way. You can either wait until it arrives in the official repositories or apply it yourself by following the advice in post #53 and on in the bug report.


As Anwar pointed out, Redshift fetches its geolocation data online by default. There is a workaround, though:

Manual configuration of geolocation data


a.) Using a config file

From the project's homepage:

Redshift will look for a configuration file in “~/.config/redshift.conf”. Here is an example:

; Global settings
[redshift]
temp-day=5700
temp-night=3500
transition=1
gamma=0.8:0.7:0.8
location-provider=manual
adjustment-method=vidmode

; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=55.0
lon=12.0

; In this example screen 1 is adjusted by vidmode. Note
; that the numbering starts from 0, so this is actually
; the second screen.
[vidmode]
screen=1`

Look for the directory provided above. If the configuration file doesn't exist, create one and append any custom options you like.

You will want to include location-provider=manual and modify lat= and long= with your location. This dialog will help you determine your coordinates.


b.) Using command-line arguments

Launch Startup Applications:

enter image description here

Find the Redshift entry in the startup app list and hit Edit. Under command enter the following string:

gtk-redshift -l LAT:LONG

Where LAT and LONG correspond with your coordinates. Hit save, then relog to activate Redshift.


The answer is yes. Redshift requires active Internet connection. It depends on libgeoclue0 package which fetch geo location from Internet.

$ apt-cache depends redshift 
redshift
  Depends: libc6
  Depends: libgconf2-4
  Depends: libgeoclue0
  Depends: libglib2.0-0
  Depends: libx11-6
  Depends: libxcb-randr0
  Depends: libxcb1
  Depends: libxxf86vm1

You can also verify this by running redshift from terminal. The terminal will display messages like

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
According to the geoclue provider we're at: 22.36, 91.80
Using method `randr'.

Which suggests, it is using Internet.

But, if you start redshift from terminal without Internet connection, the terminal will display these kinds of messages:

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
Could not get location (3 retries left): Geoclue master client has no usable Position providers.
Unable to get location from provider.