73

I'm new to linux and I don't know how to install redshift 1.9.1, configure the color temperature and make it automatically start. I'm using Ubuntu 14.04 LTS.

rm-vanda
  • 3,176
hans-t
  • 1,132
  • 2
  • 9
  • 17

5 Answers5

133

Nowadays, as of 14.04 -- redshift is in the repos by default:

sudo apt-get install redshift redshift-gtk
Seth
  • 58,122
rm-vanda
  • 3,176
  • 5
    Downvoting this - the question posed was about installing version 1.9.1 on Ubuntu 14.04 LTS. Only version 1.8 is in the repo, so this answer fails to address the question correctly. – kguest Nov 11 '15 at 23:24
  • 35
    Upvoting this as this will be what you'd want 9 times out of 10 – kuzyn Jun 26 '16 at 19:48
  • 4
    @kguest The OP was trying to be specific, assuming there're different ways to install the program. Who'll wanna compile when theres a package in ppa? – KhoPhi Jul 23 '16 at 21:37
  • Tbh, if he's being specific, he should have put the version in the title/tags... all the people who google "how to install redshift ubuntu" will be redirected here. – Ashley Feb 27 '18 at 18:06
  • Does not exist on 18.04. :( – Caleb Stanford Nov 08 '18 at 06:02
  • 2
    @6005 You need to enable the "universe" repository before you install: sudo add-apt-repository universe; sudo apt update – mchid Nov 07 '19 at 01:00
12

Finally, it works, thanks to user2832080. This is what I did:

  1. Install randr dependency.

    $ sudo apt-get install libxcb1-dev libxcb-randr0-dev libx11-dev
    
  2. Download redshift 1.9.1 and extract it.

  3. change to redshift 1.9.1 directory and type:

    $ ./configure --enable-randr --enable-gui --enable-ubuntu \
    --with-systemduserunitdir=$HOME/.config/systemd/user
    
  4. $ make

  5. $ sudo make install
  6. create redshift.conf at ~/.config, see this link.

  7. go to /usr/local/bin and run redshift-gtk.

  8. turn on autostart.
Tummala Dhanvi
  • 1,821
  • 3
  • 21
  • 34
hans-t
  • 1,132
  • 2
  • 9
  • 17
  • 1
    I was about to give up on redshift until I found this! This worked for me with redshift-1.11 on Ubuntu 14.04. Thanks very much! – quux00 Oct 28 '16 at 02:08
5

In Ubuntu 19.10, you need no redshift any more, there is a feature built in called "Night Light"

(Open display settings and select the Night Light tab at the top to turn it on)

It is not exactly like redshift, but quite similar.

rubo77
  • 32,486
  • Where is this setting in Xubuntu 19.10? – Kevin Bowen Nov 18 '19 at 22:21
  • Do you have a link stating that Redshift was acquired by Gnome and rebranded as Night Light? – WinEunuuchs2Unix Nov 18 '19 at 22:49
  • @WinEunuuchs2Unix I don't think it was acquired by Gnome or anything. It is just an equivalent feature that they included in the Distribution. I prefer Redshift to be honest - seems to be better at gradually changing the colour. – ThunderBiggi Dec 02 '19 at 09:46
4

Simply use apt

sudo apt-get install redshift

Then you can get a widget for controlling it. For example, I used the Discover(Or Software Center in Ubuntu) app in KDE Kubuntu for installing the redshift control widget.

enter image description here

3

Firstly, you need to download redshift from the git link provided and extract it. Then look on the HACKING file. It has the instructions you need to install it from source.

I quote it here for easier access:

Build from repository

$ ./bootstrap
$ ./configure

The bootstrap script will use autotools to set up the build environment and create the configure script.

Use ./configure --help' for options. Use--prefix' to make an install in your home directory. This is necessary to test python scripts. The systemd user unit directory should be set to avoid writing to the system location.

Systemd will look for the unit files in ~/.config/systemd/user so this directory can be used as a target if the unit files will be used. Otherwise the location can be set to no to disable the systemd files.

Example:

$ ./configure --prefix=$HOME/redshift/root \
--with-systemduserunitdir=$HOME/.config/systemd/user

Now, build the files:

$ make

The main redshift program can be run at this point. To install to the prefix directory run:

$ make install

You can now run the python script. Example:

$ $HOME/redshift/root/bin/redshift-gtk

Depenencies

  • autotools, gettext
  • libdrm (Optional, for DRM support)
  • libxcb, libxcb-randr (Optional, for RandR support)
  • libX11, libXxf86vm (Optional, for VidMode support)
  • geoclue (Optional, for geoclue support)

Notes

  • verbose flag is (currently) only held in redshift.c; thus, write all verbose messages there.

Hopefully after some minutes you will have it set it up.

Now, you want to configure it to your liking.

I haven't hacked around with advanced configs since I am pretty happy with the default setting. There are two ways to set up your variables. First, you can pass them when you start redshift (e.g. redshift -l 55.7:12.6 -t 5700:3600) or you can make a config file with all your settings if its too complicated (on ~/.config/redshift.conf). The most important setting is your location which is the -l variable above. Find your latitude on google and pass it there. The -t is about the color temperature at day and night. There are a lot more options which you can find with man redshift. After you find the desired options you just put it on the start up programs with the command e.g. redshift -l 55.7:12.6 -t 5700:3600.

You can find more info on the redshift site: http://jonls.dk/redshift/

user2832080
  • 261
  • 4
  • 8