Redshift 1.6 released

Finally, a new release of Redshift, and at the same time packages have been built for the newly released Ubuntu Maverick (to be found in the PPA as usual). There is a bunch of bug fixes in this release and some hastily thrown-together configuration file support. It works, but there is no documentation other than the example at the end of this post. Here is the list of changes:
  • Support for optional configuration file (fixes #590722).
  • Add man page for redshift written by Andrew Starr-Bochicchio (fixes #582196).
  • Explain in help output that 6500K is the neutral color temperature (fixes #627113).
  • Fix: Handle multiple instances of the GNOME clock applet; contributed by Francesco Marella (fixes #610860).
  • Fix: Redshift crashes when VidMode fails (fixes #657451).
  • Fix: Toggle menu item should not be of class gtk.ImageMenuItem (fixes #620355).
  • New translations and translation updates: Lithuanian (Aurimas Fišeras); Brazilian Portuguese (Matteus Sthefano Leite da Silva); Finnish (Jani Välimaa); Italian (Simone Sandri); French (Emilien Klein); Russian (Anton Chernyshov).

Looking forward to 1.6.1

I hope to release Redshift 1.6.1 before the end of the month. It will include some small bug fixes, updated documentation and updated translations, but for this to happen I will need your help:

  • Please help get the translations finished for 1.6.1 if you are fluent in one of the languages that Redshift has been translated to. The text strings will not change before 1.6.1.
  • Are you familiar with writing man pages? Please help document the configuration file syntax (#662632).

Configuration file

Redshift will look for a configuration file in “~/.config/redshift.conf” (or in XDG_CONFIG_HOME if that has been set). A different configuration file can be loaded with the command line option “-c”. 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
  • Jimmy

    I get this error when trying to use the config file…
    I used a direct copy and also an altered one
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 130 (XFree86-VidModeExtension)
    Minor opcode of failed request: 19 (XF86VidModeGetGammaRampSize)
    Value in failed request: 0×17
    Serial number of failed request: 12
    Current serial number in output stream: 12

  • Jon Lund Steffensen

    @Jimmy: The config file above selects the second screen (the screens are labeled starting from zero). The program will fail if you only have one screen.

  • http://bugflux.org André Prata

    Hi Jon, thanks for a great tool!

    I’m just bummed that this version currently doesn’t get the location automatically from the gnome-clock for me, but it works just fine with the static config.

    Anyway, please let me help translating the project to Portuguese without creating a launchpad account, can I do it?

  • http://patscompservices.blogspot.com Patrick Dickey

    I installed this on Ubuntu 10.10 and am trying to find the configuration file. I checked in ~/.config and there isn’t one listed. As far as I know, I haven’t set XDG_CONFIG_HOME to anything. How would I find out, and how would I find the configuration file otherwise?

    And how is the GUI coming along? If I knew anything about creating one in Gnome, I would help out. I’ve only created Java GUI’s and Visual Basic GUI’s. Unless there’s an IDE that will allow me to drag-and-drop for Gnome, I’m pretty much lost.

    Have a great day:)
    Patrick.

  • Jon Lund Steffensen

    @Patrick: Create redshift.conf in ~/.config/, then fill out whatever settings you want to set there. There is no example file included with the program, and not much documentation either, sorry. The example above should help you along, though.

  • http://patscompservices.blogspot.com Patrick Dickey

    Thanks, and I’ll do that. One other quick question. In your example, you have screen=1. I have a laptop with an external monitor connected. Would I have to use both screen=0 and screen=1 (they’re mirrored in Gnome Display as the monitor isn’t accurately detected)?

    Have a great day:)
    Patrick.

  • Jon Lund Steffensen

    @Patrick: I will suggest that you try without any “screen” in your configuration file. That should make redshift apply adjustments to all screens.

  • George

    Hi Jon,

    I have a dual monitor setup and only 1 monitor is being adjusted. Using a configuration file I can set screen=0 or screen=1 and each screen is adjusted correctly but obviously not together. I tried your suggestion of removing the screen configuration option but then only screen 0 is adjusted. My workaround at the moment is to run 2 instances of redshift with different config files but I’m wondering if there is a better option.

    Thanks,
    George

  • Pingback: Redshift: épargner ses yeux devant l’écran | Ludovic Favre DevBlog

  • Iridos

    I ran the redshift version 1.2 from squeeze on a dual monitor setup and it adjusts both monitors. (Tried xflux first and it adjusts only screen 0, then noticed that redshift/gtk-redshift are actually in the repo)

  • http://twitter.com/uriel1998 Steven Saus

    Try “-m RANDR” instead of “-m vidmode” for dual monitor output.  It makes all the difference for me.

  • http://www.facebook.com/profile.php?id=572636184 Baran Karabulut

    Where can i find information about building a configuration file like that ? I see there is no manual but if you can write an example like that there should be somewhere to lookup. As a note; i am not a coder, and i don’t know any computer languages, but it shouldn’t be that hard to write a configuration file right ?

    Edit: I was being impatient :) The answer to that question is here https://bugs.launchpad.net/redshift/+bug/662632/comments/4

  • http://www.facebook.com/profile.php?id=572636184 Baran Karabulut

    I have added the configuration file following lines

    brightness-day=0.7
    brightness-night=0.4 

    but it doesn’t work, response i get is 
    “Unknown configuration setting “brightness-day”
    “Unknown configuration setting “brightness-night”

  • http://jonls.dk/ Jon Lund Steffensen

    IIRC the brightness-day/night feature was introduced after the last release (1.7). You’ll have to compile redshift yourself, or wait for the next release.

  • http://www.facebook.com/profile.php?id=572636184 Baran Karabulut

    I found out that seperate configuration for day and night doesn’t work yet but i could set the brightness by “brightness=value” line. This value can be 0.1 to 1.0.

  • http://www.facebook.com/profile.php?id=572636184 Baran Karabulut

    You are right. Thanks for your understanding and patience. I promise i will be quit from now on :)

  • city_wok

    I had the same problem, and then looked at the config file comment:
    ; In this example screen 1 is adjusted by vidmode. Note
    ; that the numbering starts from 0, so this is actually
    ; the second screen.

    Change your video screen to 0 to get it to work if you only have on screen (laptops).
    [vidmode]
    screen=0

  • Theo Oliveira

    It worked on Ubuntu 12.10

  • http://www.facebook.com/Doc.SackMan Sawney Bean

    Redshift is really good. Thank you. Really creates a better user experience. Nice one!

  • boosook

    Had to install a gazillion developer libraries to build it on Ubutnu 12.04, but now it works like a charm even with Gnome Shell. Thank you so much! Btw, a graphical interface would be nice. ;)

  • Pingback: Error When Running Gtk-redshift | Click & Find Answer !

  • kenden

    Here is an more complete sample file:

    ; Global settings for redshift
    [redshift]

    ; Set the day and night screen temperatures
    temp-day=5700
    temp-night=3500

    ; Enable/Disable a smooth transition between day and night
    ; 0 will cause a direct change from day to night screen temperature.
    ; 1 will gradually increase or decrease the screen temperature
    transition=1

    ; Set the screen brightness. Default is 1.0
    ;brightness=0.9

    ; It should be possible to use different settings for day and night
    ; but it does not work in version 1.7:
    ; https://bugs.launchpad.net/redshift/+bug/1237091
    ;brightness-day=0.7
    ;brightness-night=0.4

    ; Set the screen gama
    gamma=0.8:0.7:0.8

    ; Set the location-provider: ‘geoclue’, ‘gnome-clock’, ‘manual’
    ; type ‘redshift -l list’ to see possible values
    ; The location provider settings are in a different section.
    location-provider=manual

    ; Set the adjustment-method: ‘randr’, ‘vidmode’
    ; type ‘redshift -m list’ to see all possible values
    ; use ‘randr’ for dual screen settings
    ; The adjustment method settings are in a different section.
    adjustment-method=vidmode

    ; Configuration of the location-provider:
    ; type ‘redshift -l PROVIDER:help’ to see the settings
    ; ex: ‘redshift -l manual:help’
    [manual]
    lat=48.1
    lon=11.6

    ; Configuration of the adjustment-method
    ; type ‘redshift -m METHOD:help’ to see the settings
    ; ex: ‘redshift -m randr:help’
    ; 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

  • http://jonls.dk/ Jon Lund Steffensen

    Thanks, I put this on the main page.