
Redshift – A better flux program for Linux (2014) - foo101
https://techblog.jeppson.org/2014/11/redshift-a-better-flux-program-for-linux/
======
brobdingnagians
I absolutely _love_ Reshift. I've used it for years now, ever since I really
strained my eyes with working in terrible lighting for too long in a strange
situation awhile back... It helps reduce my eye strain dramatically-- I set it
at 4000k and also have a smart bulb also set at 4000k for when I work at
night. Absolutely awesome program; eye-saver; I'd love to personally thank the
author some day.

~~~
htor
me too. you can donate money for example!

------
AdmiralAsshat
>Unfortunately, it is harder to configure than F.lux. It is a command line
only tool (with a GUI indicator component) and it requires creating a manual
configuration file.

I've been using Redshift for years, and it didn't _require_ creating a manual
configuration file unless you wanted to override the default settings. By
default, it would use the geoclue2 package to try to figure out your
geolocation and automatically adjust the brightness depending on that.

Unfortunately, the geoclue2 package has been broken on Fedora for several
releases (it triggers an SELinux alert), so I only recently had to create the
redshift conf file to manually specify my GPS coordinates. Other than that,
there's no need to override any of the other default settings.

------
bdz
>Unfortunately, it is harder to configure than F.lux. It is a command line
only tool (with a GUI indicator component) and it requires creating a manual
configuration file.

Sums up the Linux experience perfectly.

"I'm a Windows/OSX user and want to switch to Linux is there an alternative to
X app?

Yes but unfortunately, it is harder to configure, it is a command line only
and it requires creating a manual configuration file."

That's when a lot of people just nope out.

~~~
michaelmrose
If you check out [http://jonls.dk/redshift/](http://jonls.dk/redshift/) you
will note that they provide a sample configuration in what appears to be toml
where each option is annotated example

    
    
        ; Global settings for redshift
        [redshift]
        ; Set the day and night screen temperatures
        temp-day=5700
        temp-night=3500
    

There are all of 9 settings in the default config with lots of explanations.

The level of challenge required to copy some text into a text file with the
syntax

    
    
        [section]
        settingname=value
    

and change the values relevant to you is very modest.

People are prone to overestimate the difficulty of anything without a gui in
fact its often like this.

Incidentally there appear to be a number of different guis for example on kde
you could use

[https://phabricator.kde.org/source/plasma-redshift-
control/](https://phabricator.kde.org/source/plasma-redshift-control/)

To see the how this looks see

[https://www.makeuseof.com/tag/widgets-linux-plasma-
applets/](https://www.makeuseof.com/tag/widgets-linux-plasma-applets/)

This post sums of peoples misperception of linux perfectly.

~~~
Matt3o12_
But that is not the point. For people who have never edited a config file,
this seems quite strange. They wouldn’t know which editor to use, how to
properly save the file and, most importantly, how to apply the config file.
Chances are, I couldn’t do it intuitively. My go to way would be to just use
systemctl restart but not all Unix systems use systemd. And if you start it
using the desktop GUI, systemd is not used, so I have to “ps aus | grep
redshift“, copy the PID (or process name) and use kill or killall. Sometimes
this doesn’t work because it gives me 10 pids because it spawned so many
children and I don’t have killall installed.

This is not very difficult if you have done it before, but there is steep
learning curve before you can do it and quite different from “check a few
boxes and click apply”. I personally prefer the config file way because it
gives you way better control over your system (especially if a config file
causes crashes due to a bug), it is way easier to backup and restore without
guessing (program X uses 5 different paths for its gui files) and you can
distribute changes easier and without the help of a specialized program.

But this sums up the Linux experience quite well IMO: there are many
advantages to using Linux and once you have gasped the basics, everything is
less scary. But the learning curve is quite steep especially if you have never
done anything like it so not many people use it and therefore there are less
Linux applications. Furthermore there is also more variety which means the way
I know to do might not work for your Linux distro or the old server I’m
ssh’ing into.

~~~
lozf
> if you start it using the desktop GUI, systemd is not used, so I have to “ps
> aus | grep redshift“, copy the PID (or process name) and use kill or
> killall.

Or, since you started it with the GUI, you could just choose "quit" from the
menu that appears when you click on it.

------
turrini
If you have a calibrated screen, make sure you proper configure Redshift[0],
so you don't lose your colour curves

[0]: [https://forum.manjaro.org/t/making-redshift-play-better-
with...](https://forum.manjaro.org/t/making-redshift-play-better-with-
calibrated-screens/35070)

~~~
ubercow13
It does that by default now I believe

------
MightySCollins
This is now built into GNOME. You can set it under Displays

~~~
mariushn
But it can't decrease brightness:
[https://bugzilla.gnome.org/show_bug.cgi?id=784810](https://bugzilla.gnome.org/show_bug.cgi?id=784810)

~~~
craftoman
> But it can't decrease brightness

Who said that? You can always decrease brightness on a Linux laptop since the
first gnome, I myself have gnome3 installed on 2 laptops and the brightness
buttons are working perfectly fine.

~~~
dokem
I could never adjust the brightness of my laptop under Linux. So many people
defend Linux to the point of denying people's first hand experience with it.

~~~
aetherspawn
Didn’t work on my old Toshiba Satellite either. It wasn’t a particularly
unpopular piece of hardware or anything.. actually it couldn’t even read the
battery % due to an ACPI issue.

------
graupe
Shameless plug: If someone is interested in using a program that has X as the
only runtime dependency, you could checkout [0]. It is less a works-out-of-
the-box solution, than a set of two tools you can integrate into your setup to
shift screen color to your liking. It was inspired by [1].

[0]: [https://github.com/graupe/brownout](https://github.com/graupe/brownout)
[1]:
[https://news.ycombinator.com/item?id=10575921](https://news.ycombinator.com/item?id=10575921)

~~~
bwidlar
works great, thanks.

------
foepys
Sadly not available for Wayland because of Wayland's architecture. KDE and
GNOME have some functionality built in but I don't know how good it actually
is compared to redshift.

~~~
minus7
That's not quite true: the compositor needs to support it. There's a protocol
[1] for it that's supported by a redshift with a patch [2]. It also works out
the box for any wlroots-based [3] compositors, like sway [4].

[1] [https://github.com/swaywm/wlr-
protocols/blob/master/unstable...](https://github.com/swaywm/wlr-
protocols/blob/master/unstable/wlr-gamma-control-unstable-v1.xml)

[2]
[https://github.com/minus7/redshift/tree/wayland](https://github.com/minus7/redshift/tree/wayland)

[3] [https://github.com/swaywm/wlroots](https://github.com/swaywm/wlroots)

[4] [https://github.com/swaywm/sway](https://github.com/swaywm/sway)

~~~
majewsky
Footnote: Stable sway (0.15) is not based on wlroots, the next version (1.0)
will be.

~~~
Sir_Cmpwn
Footnote footnote: stable sway (0.15) supports redshift as well, albiet with
an older version of the protocol.

~~~
cyphar
Footnote footnote footnote: Thanks for your work on sway. I still haven't
switched to Wayland full-time, but sway was definitely a huge push for me to
try it out. :D

~~~
Sir_Cmpwn
Thanks for the kind words :)

------
enz
Happy user here. Works like a charm on a Debian laptop and a 3-screens Debian
desktop machine.

------
vermaden
Not only for Linux.

Works great on FreeBSD as well.

[https://vermaden.wordpress.com/2018/06/28/freebsd-desktop-
pa...](https://vermaden.wordpress.com/2018/06/28/freebsd-desktop-part-11-key-
components-blue-light-spectrum-suppress/)

... and if Redshift seems too 'bloated' with too much dependencies there is
OpenBSD style SCT - Set Color Temperature:

[https://www.tedunangst.com/flak/post/sct-set-color-
temperatu...](https://www.tedunangst.com/flak/post/sct-set-color-temperature)

~~~
nbsd4life
I have this in my ~/.xinitrc because I found the color changes of f.lux
distracting:

xrandr --output DVI-I-1 --gamma 1:1:0.5

------
krylon
I have been using Redshift ever since I reverted from Mac to GNU/Linux. I am
not certain if it has any influence on my sleep, but I do like the warm, comfy
colors, especially in winter.

------
londt8
I don't really like these programs. I think it's better to drop monitor
brightness than adjust the color temperature. Better for your eyes and you can
see the colors better.

~~~
LambdaComplex
It's unfortunate that you're being downvoted without anyone telling you why
they're downvoting.

The issue isn't brightness, it's the actual color of the light. The tl;dr
version is "blue light definitely messes with your sleep cycle." There's a
Wikipedia page about this, with several references at the bottom:
[https://en.wikipedia.org/wiki/Effects_of_blue_light_technolo...](https://en.wikipedia.org/wiki/Effects_of_blue_light_technology)
(And I'm sure a search in your favorite search engine will find even more
information on this subject)

~~~
tEMporality7
> blue light definitely messes with your sleep cycle

...and kills your eye cells.

~~~
randallsquared
...eventually when your immune system declines due to age, or if you have an
immune disease. The author of f.lux reviewed the recent blue light study on
HN, in part pointing out that a daylit blue sky delivers far more blue light
to one's eye than screens.

------
wtmt
I love these programs (or settings) on any platform I use (Windows, Mac, iOS,
Linux). They do make a difference to my eyes in the evenings when working with
these screens.

------
vancan1ty
I prefer sct -- a very simple tool for setting the color temperature:

[https://github.com/faf0/sct](https://github.com/faf0/sct)

[https://www.tedunangst.com/flak/post/sct-set-color-
temperatu...](https://www.tedunangst.com/flak/post/sct-set-color-temperature)

~~~
foo101
Does this work on macOS? The source code seems to be including X11 headers, so
I guess it would require XQuartz or something to make it work? Has anyone got
sct to work on macOS?

Redshift works just fine on macOS. I've been using it and I like it more than
f.lux because one can write scripts around it.

------
eftychis
You should definitely start using redshift, if the thought crosses your mind.

P.S. I am not sure what one's mileage might be in Linux without being able to
access a terminal. That said I found redshift working out of the box, and
there are various guis (see mentioned below). So the argument that it was
harder to configure does not resonate with me really.

------
Kablys
Even better option is to check if your monitor supports DDC [1], that way you
can adjust monitor settings without fiddling with monitor buttons. For linux I
use ddccontrol.

[1]
[https://en.wikipedia.org/wiki/Display_Data_Channel](https://en.wikipedia.org/wiki/Display_Data_Channel)

------
ashwanidausodia
I use it along with safeeyes. Both are awesome

------
sleavey
Happy user of redshift for years. Almost no problem except a strange one on
Ubuntu 16.04 involving the Geoclue dependency. On 18.04 it is flawless.

------
sunseb
Is it a good idea to activate Redshift/flux all the day (not just at night)?

~~~
quadrangle
I'll go a step further: most screens even _black_ has some brightness and
blueness. You can see the difference if you wear blue-blocking glasses. A pair
of those is worthwhile. They're more widespread and inexpensive these days.

But yeah, like the other reply, I use Redshift slightly less blue in daytime
and much less blue at night.

~~~
foo101
What's your Redshift setting for daytime?

Do you or anyone else have a third setting for bedtime like f.lux has (say for
1 or 2 hours prior to bedtime)? If yes, how do you simulate this third setting
and how do transition smoothly from the evening setting to the bedtime
setting?

~~~
quadrangle
I set daytime to 6250. I try to remember to wear amber glasses at bedtime. And
the KDE Plasma Redshift Control widget lets me quickly scroll over the icon to
make things more red or less.

I don't have 3 different auto-settings. I would LIKE to do that though!! Is
there a way to do that?

