====== f.lux / Xflux ====== A [[http://www.pnas.org/content/112/4/1232.full.pdf+html|PNAS study]] demonstrates that the blue color emitted by most computer (and tablet's) screens is affecting sleep. To circumvent this negative effect, a small but efficient little software called f.lux is coming to the rescue. It is available here: [[https://justgetflux.com]]. ===== f.lux Binary Installation===== To get f.lux installed on Debian the information available on the site itself isn't sufficient, as you only get the information about how to install it on Ubuntu using a ppa. To get it working on Debian 7 [Wheezy] (or Debian 8 Jessie/LMDE 2 Betsie), here is what to do: * Download the 64 bit archive ([[https://justgetflux.com/linux/xflux64.tgz|download]] - or check the [[https://justgetflux.com/linux.html|official f.lux page]]) * Unpack it * Put it in /usr/local/bin * Launch the program with your current coordinates Which translates into the following commands: <code> > wget https://justgetflux.com/linux/xflux64.tgz > tar -xvzf xflux64.tgz > sudo mv xflux /usr/local/bin/ > /usr/local/bin/xflux -l 50.8 -g 4.4 </code> Your screen will now shift it's white point color temperature, colder (more blue) during the day and warmer (more red) at night. The coordinates in the example above are for Europe/Belgium/Brussels, to get your local coordinates, you could use [[https://www.google.com|google maps]], right click on your location and select "What's here?". A window will pop with the selected location's latitude and longitude. Only one decimal will be pertinent to f.Lux. ===== User Interface [Xflux] ===== There is a Debian compatible GUI for f.lux, called Xflux, written in Python, that's available [[https://github.com/xflux-gui/xflux-gui|on GitHub]]. You're invited to consult the full README.md file related to this project, but as a summary, here are the steps to install it: <Code> # Install dependencies > sudo apt-get install git python-appindicator python-xdg python-pexpect python-gconf python-gtk2 python-glade2 libxxf86vm1 # Download xflux-gui > cd /tmp > git clone "https://github.com/xflux-gui/xflux-gui.git" > cd xflux-gui > python download-xflux.py # EITHER install globally > sudo python setup.py install # OR, install in your home directory > python setup.py install --user # Run flux > fluxgui # To uninstall: > sudo rm -rf /usr/local/lib/python2.7/dist-packages/{fluxgui/,f.lux_indicator*} > sudo rm /usr/local/share/icons/hicolor/scalable/apps/fluxgui.* > sudo rm /usr/local/share/applications/fluxgui.desktop > sudo rm /usr/local/bin/{xflux,fluxgui} > rm -rf ~/.gconf/apps/fluxgui/ </Code> You now have the indicator applet in **/usr/local/share/applications**, you can double-click on it to launch it the first time. You have the option to have f.lux indicator automatically launched at startup... You'll also notice that there is no "shortcut" available in your desktop "Menu" for "fluxgui". Although it will appear in your toolbar on your next login... In case you'd like to have a menu entry for fluxgui, please read [[tricks:application-icon|this article]]. ++++ Previously available, now unmaintained, GUI software | [[https://github.com/Kilian/f.lux-indicator-applet|Kilian Valkhof on github]] made the **f.lux-indicator-applet**, written in Python, it gives you the possibility to access a GUI to control xflux. Installation instruction can be found [[https://github.com/Mystro256/f.lux-indicator-applet/blob/master/README.md|here]], and are as follow: <code> > sudo apt-get install python-gconf python-pexpect python-appindicator git > cd /home/user/location/for/git-clone > git clone https://github.com/Kilian/f.lux-indicator-applet.git > cd f.lux-indicator-applet/ > python setup.py build > sudo python setup.py install # IF YOU DON'T WANT TO KEEP THE GIT REPO: # > cd .. > rm -r f.lux-indicator-applet </code> ++++