It seems redshift doesn't run without an active internet connection. If so, is there some way it could be run when there's no connection to the Internet?

  • 6
    It's basically a bug in redshift. (Note that doesn't automatically make this off-topic) – Tom Brossman Sep 29 '12 at 19:07

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

; The location provider and adjustment method settings
; are in their own sections.

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

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.

  • I looked up for the config file. since it wasn't there i created one. setup location-provider=manual, and modify lat=8.51 & lon=76.96 set screen=0 since i use a laptop, restarted lap, still it doesn't seem working without connecting to net Thanks in advance – prasanna Sep 30 '12 at 4:10
  • What's the output when you start recoll from the command line (CTRL + ALT +T)?. Try the following command: redshift -v -c '~/.config/redshift.conf'. – Glutanimate Sep 30 '12 at 5:08
  • And if that doesn't work either, try this: redshift -v -l 8.5:77.0. – Glutanimate Sep 30 '12 at 5:12
  • also did you include the section headers (i.e. [redshift] and [manual]) in your config file? – Glutanimate Sep 30 '12 at 5:23
  • - i had included the section headers i.e. [redshift] and [manual] in the config file. - the command redshift -v -c '~/.config/redshift.conf' doesn't work - but the second one worked: redshift -v -l 8.5:77.0 It showed : Location: 8.500000, 77.000000 Brightness: 1.00 Gamma: 1.000, 1.000, 1.000 Using method `randr'. Period: Daytime Color temperature: 6500K (ending in) Period: Daytime Color temperature: 5500K – prasanna Sep 30 '12 at 5:39

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

$ apt-cache depends 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.
  • It showed first one. So there no way to use redshift when not connected to internet. – prasanna Sep 29 '12 at 19:04
  • The first one means, you have internet connection and redshift detects it. The line According to geoclue provider we're at ... saying this. – Anwar Sep 29 '12 at 19:07
  • @prasanna If it answer your query, can you consider accepting the answer? – Anwar Sep 29 '12 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.