Give your eyes a break in the evenings with Redshift
By Andrew Powell, published 24/11/2016 in Tutorials
Eyes hurting at night from the glare of your screen? Perhaps it's even affecting your sleep? Then maybe you should give Redshift a try, a program similar to Twilight on Android and inspired by the likes of f.lux.
If you've heard of either Twilight or f.lux, you'll probably know what these sorts of programs do: they adjust the colour temperature of your screen according to the time of day, often by altering the amount of blue light being emitted, to make the colour temperature and brightness more suitable for viewing in your environment. The end result is "normal" bright light during the day, for easy screen visibility during the day, but at night your screen will display a much softer and less bright image, with a reddish hue, which can greatly reduce eye strain and just generally make night time computer use a lot more comfortable.
Redshift is written and maintained by Jon Lund Steffensen. Primarily it is for Linux, although there is a Windows build available with some limitations. f.lux, of which Jon was inspired by to create Redshift, does have a Linux version (as well as Windows, Mac, iOS and Android) but is not open source, unlike Redshift.
Installing Redshift
Redshift is clearly a fairly popular little utility because most major distributions seem to have it in their main repositories.
On Ubuntu, for example, it's only an apt
install away:
sudo apt-get install redshift
Similarly on something like Arch Linux, it's right there in the main Community repo:
pacman -S redshift
And so on. Source code is available from the project's Github.
If you're on any desktop other than KDE...
Then you should probably install redshift-gtk
as well, if it wasn't automatically installed in the first place with Redshift. This will give you a systray icon with some functionality such as click on/off toggle and status information.
Unfortunately, I've found that the systray functionality provided by redshift-gtk does not play well with the KDE desktop for some reason. The icon will appear in KDE's systray, but will not be clickable in any way.
Thankfully, there is a Redshift applet (plasma widget) specifically for KDE, which you can get here. The Plasmoid works fine and even has some GUI configuration options not found in the regular redshift-gtk
program.
Speaking of configuring...
Configuring and Running Redshift
Redshift is capable of automatically detecting your location (longitude and latitude coordinates) if you have the geoclue
package installed on your system. Apparently it's not always spot on or may not even work properly, but personally this is the option I went with and I was able to simply run Redshift and not worry about configuring anything.
You can run Redshift from your applications menu or execute redshift-gtk
in a terminal. If you're on KDE and using the Plasmoid, simply adding the widget to your desktop or panel should autostart Redshift behind the scenes.
If you wish to run Redshift from the command-line, redshift <options>;
is easy enough. redshift -h
will show you all the available command-line switches.
For more information, see the configurations section of the Redshift website. Jon also explains how you can make a configuration file at ~/.config/redshift.conf
which allows you to set all sorts of options permanently (including your manual location coordinates, if geoclue doesn't work for you).
Enjoy!
The red tint on the display in the evenings will take some getting used to the first time around. But personally, I now can't bear to not use a utility like Redshift! It is far more pleasant on the eyes and is just generally more comfortable using a computer in the evening with it enabled and adjusting colour temperature to softer levels, with less blue light glare.
Of course, best thing of all for your eyes and sleep quality is to... well, not use a computer or smartphone in the evenings at all! But we all know that's often going to be the case!