How to install and autostart f.lux on Fedora

Adapts screen color temperature according to daytime

During the day, computer screens look good because they’re designed to look like the sun.
But, at evening or at night, they probably shouldn’t be looking like the sun. Because the ambient light is different.

The answer is f.lux.

It’s a small program that makes the color of your computer’s display adapt to the time of day, warm at night and like sunlight during the day.

It’s even possible that you’re staying up too late because of your computer. You could use f.lux because it makes you sleep better, or you could just use it just because it makes your computer look better.

f.lux makes your computer screen look like the room you’re in, all the time. When the sun sets, it makes your computer look like your indoor lights. In the morning, it makes things look like sunlight again.

f.lux with gui

Just set f.lux for the kind of lighting you have, put zipcode or long/lat of where you live and forget about it. f.lux will do the rest, automatically.

In Fedora, we use f.lux and add it to automatically start at login

An indicator project is available for f.lux, f.lux GUI was done by Kilian Valkhof and he’s posted the indicator applet source on GitHub. The package uses Gnome’s AppIndicator, so is easy adaptable for Fedora. The repository is actually unmaintained, but a new one is available here.

Ok, but here we do the things in the old school way, so let me explain hot to add f.lux to a Fedora system and how to configure it to autostart at login.

First, download f.lux for Linux from justgetflux.com/linux.html.

Extract it on a folder and digit these commands in a Terminal window:

  $mv [YOUR EXTRACTION FOLDER]/xflux /home/<user>/.local/bin/
  $chmod 755 /home/<user>/.local/bin/xflux

Now you can run flux with xflux command.

  $xflux --help

For more info on options.

To start it, you have to define your zipcode or your latitude.

  $xflux -l <latitude> -g <longitude>
  $xflux -z your zipcode (Only if you're in US)

Example:

  $xflux -l 42.20 -g 15.00

Then, to execute it on start-up, create a desktop file in autostart:

  $sudo touch ~/.config/autostart/xflux.desktop
  $sudo nano ~/.config/autostart/xflux.desktop

And populate the desktop file like this:

  [Desktop Entry]
  Encoding=UTF-8
  Version=1.0
  Name=xflux
  Comment=Adapts screen color temperature according to daytime
  Exec=/home/<user>/.local/bin/xflux -l <latitude> -g <longitude>
  Terminal=false
  Type=Application

Save all and restart your machine.

After restart, you can check your System Monitor to see if xflux is running.

Leave a Reply

Your email address will not be published.