Shimmer dimmer

Charly's Column – f.lux

Article from Issue 227/2019
Author(s):

You don't have to be a vampire to be sensitive to bright light at night. Charly, who – as regular readers know – is a practicing light conservationist, now makes it clear to his desktop PC that it's not good to be too dazzling at night.

If you ask me, it has to be possible to adjust lighting to suit your needs in an unobtrusive and fully automated way. I enabled night mode on my Android smartphone. In the evening, the display shows an ever-decreasing amount of blue light as time progresses. At first, this seems a bit strange and takes getting used to, but it is very friendly on the eyes. Without night mode, I get dazzled when I unlock the phone. This is because its display – like most monitors – is adjusted to a color temperature of 6500 Kelvin.

Cirque du Soleil

Light with a temperature of 6500 Kelvin has a higher blue component than sunlight, which does not exceed 5800 Kelvin even on a clear day. For work during the day in a bright room, 6500 Kelvin is completely OK. In the evening with dim light, I feel as if my PC displays are so bright that work becomes tiring. Of course, I could manually adjust the brightness and color temperature using the buttons on my displays – but that is something that I want to be done automatically. My choice of dimmer goes by the name of f.lux.

Installing f.lux

F.lux is simply pronounced "flux". It is available as a command-line tool [1] or with a GUI [2]. I decided to go for the graphical variant. F.lux is written in Python 3, which means quickly installing some packages on my Ubuntu test system for it to run:

sudo apt install python3-distutils gir1.2-appindicator3-0.1 gir1.2-gtk-3.0

Guidance for other distributions can be found at the same source. Then I added the repository and installed the fluxgui package:

sudo add-apt-repository ppa:nathan-renniewaldock/flux
sudo apt update
sudo apt install fluxgui

At startup time, I had to tell f.lux my approximate geographic position (Figure  1). In return, it actually showed me a map, guessing my location based on my IP address. (It was about 100 kilometers away, but that was totally irrelevant from a lighting point of view.)

Figure 1: You'll enter the latitude and longitude of your location, as well as the color temperature value the display should switch to at night.

Then I specified the maximum color temperature to which f.lux can reduce the display at night. I initially chose 3500 Kelvin, which seemed to be warm enough in preview mode.

After a few evenings using the computer, I will know whether I need to readjust this value. In any case, there are enough options for this (Figure 2). Finally, to be on the safe side, I checked again whether the time zone and time are set correctly; I don't want f.lux to intervene at the wrong time of day.

Figure 2: Kelvin home alone – light sources and their color temperatures.

F.lux is also available for Windows and macOS. Enlightenments thus far: Everything is now to my liking in terms of illumination levels on the desktop – a great step forward for any light-shy Linux user.

The Author

Charly Kühnast manages Unix systems in the data center in the Lower Rhine region of Germany. His responsibilities include ensuring the security and availability of firewalls and the DMZ.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Improve Your Night Sleep with Redshift and F.lux
  • Color Temperature Tools

    Do you have problems getting to sleep after a late night computer session? Does the monitor brightness hurt your eyes? Several Linux tools are available that could help with these problems.

  • Charly's Column: Miniflux

    Sys admin Charly Kühnast typically follows 40 to 50 RSS feeds using Tiny Tiny RSS on his own server. Now, the good times spent with the faithful Tiny are coming to an end. Read on to discover the whole story.

  • Enlightened libcoap

    Charly did a spot of shopping in a furniture store and came out with a smart lighting system that he has now automated with a Linux PC: Read on for further enlightenment.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News