How Do I Install Redshift in Ubuntu?

How Do I Install Redshift in Ubuntu?

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.

5 Answers

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

sudo apt-get install redshift redshift-gtk
6

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.
1

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

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.