xflux Linux - How do I keep flux on ALL the time?

  • xflux requires post code, or latitude... How can I have flux activated all the time?

    I am running Debian. The only way I have been able to use flux is via the command line interface software "xflux".

    All seems to work fine, however, xflux requires I specify a latitude, or a postcode. There is no option (as far as I can tell) to set flux "always" on... I much prefer it always on for my eyes.

    Here is an output from xflux:

    Welcome to xflux (f.lux for X)
    This will only work if you're running X on console.
    Usage: xflux [-z zipcode | -l latitude] [-g longitude] [-k colortemp (default 3400)] [-r 1 (use randr)] [-nofork]
    protip: Say where you are (use -z or -l).

    I enter "xflux -k 3000": Nothing Happens...

    I enter "xflux -k 3000 -l 1":

    Welcome to xflux (f.lux for X)
    This will only work if you're running X on console.
    Guessing your longitude is 0.0 based on your timezone
    Specify it with -g to make things better.
    Found 1 screen.
    Your location (lat, long) is 1.0, 0.0
    Your night-time color temperature is 3000
    Going to background: 'kill 1795' to turn off.

    So as you can see, ONLY when I enter a -l or -z argument, xflux starts. I can't just start flux permanently at a specific setting.

    If anyone can help me I'd much appreciate it!

    Thank you,


  • Yes we need a daytime setting exposed here.

    Actually our Android daemon is super-great (every feature ever!) and will port back to Linux pretty well. I need someone to update the GUI for it, which is why I haven't.

  • Meanwhile, I guess, um, like this?

    xflux -k 3000 -l 1 -nofork &
    sleep 30
    kill -9 %1

  • But will this keep flux on all the time? I'd like it if the temperature would stay at 3000 ALL the time, not just at nighttime.

  • @EilloNitsua well "kill -9" will make f.lux exit without giving it a chance to reset. So you would just have a tinted XServer then and nothing more.

  • I just need 3000 color temp 24/7 << This is all I would like to do.

  • @EilloNitsua may I ask why you need this?

  • Because I prefer the screen with a color temp of 3000, I don't need all the extra blue light while I am programming. It's just more comfortable on my eyes.

    So is there a way that I can keep the screen at the temp of 3000, all day, and all night?


  • This post is deleted!

  • ? I'd appreciate it if you can let me know how to do this.

    Currently my screen is all bright and nasty. I'd much prefer flux activated at this time, even though it is daytime...

    Please let me know how to activate it day and night, 24/7?

  • So far the best I can think of is... During the day, I just use this:

    # This is New Zealand Configuration
    xflux -k 3000 -l 41 -g 175 -nofork

    Since it's New Zealand, it makes flux run during the day. Then when the screen starts to go light again, I just run this:

    # This is United Kingdom Configuration
    xflux -k 3000 -l 51 -g 00 -nofork

    flux continues to run again since in the UK at this point it is nighttime...

    If anyone happens to have a better solution, let me know. If nobody can figure one out, I'm just going to make a script that will run and do this automatically. If I do I will post it here so anyone can use it.


  • @EilloNitsua Depending on the season you could find coordinates above the Arctic Circle or below the Antarctic Circle that are in perpetual darkness. You would just have to change the coordinates around every 6 months.

  • Google 'McMurdo Station coordinates' in the winter and that would work.

  • Hello, I would also like to have the colour temperature permanently set, is there any way to just tell xflux to simply ignore the time and location and just set the colour temperature?

    xflux -k 2700

    I mean, it would also be more unixy that way, on the "do one thing" principle... right now xflux is doing more than I need!


  • Created an account just to say that I would like this functionality as well. I can do it on my Windows machine, but not on here. I need f.lux to reduce eye strain in general, not to help my sleep cycle. If I could just have it on max flux-yness all the time, that would be fantastic.

  • OK we owe everyone an update with all the parameters exposed!

  • This post is deleted!

  • I would also like it to work all the time to rest my eyes.
    Why is it possible on windows and not on linux ?

    Developpers who spend lots of time front of the display had to rest eyes with this fonctionnality.

  • I created an account just to +1 this post. F.LUX TEAM, can we get an update on this?

  • This post is deleted!

  • @shiva said in xflux Linux - How do I keep flux on ALL the time?:

    'McMurdo Station

    In the meantime, just enter the following coordinates for McMurdo Station in Alaska:
    -77.9527, 166.4895

    And then we can keep the screen filter on ALL the time. As I am learning programing myself, the only way possible to stare at a screen for a full day is with a blue light filter engaged during the day time.

  • I'd also be much appreciated if there's an update on this. I turn on flux all the time on my Mac.

  • @dkennell Yes! I created an account here also to ask for the same thing. But, even better is that on Win7 I can use the slider to adjust the colors.

    When I'm working on things where I don't care what shade of color something is, I turn blue all the way down. Then, when I have to do something where I need to see what is blue vs green or whatever, I can turn it back up enough to do that without turning it all the way up most of the time.

    I miss that on Linux. And I primarily use Linux for work! Now that Twitter foolishly has only bright white or white text on dark backgrounds, I really need it to tolerate using Twitter at all.

    May have to try to do Twitter only on Win7, but I really prefer to only use it for the few Windows-specific platforms people still insist on using that don't support Linux.

  • Hi guys, I too want to have the 3000 setting all day, or 2700. I used to have the maximum at 3000 so that I could have it all day long. I use computers all day, I program a lot, and I need the 3000 to protect my eyes, also because my eyes are very light-sensitive, I even have to use some dark glasses while driving at night and always use my laptop brightness at the minimum plus having xflux at 3000, I always use the laptop with dim lights never use it at sunlight, so you get the idea, and there are many like me.

    So it's important to have an option to have no more than 3000 the entire day, and using crontab to make xflux change its location several times per day, or even use it to change several times per year, is not practical. Could you please add an option for the maximum value to be 3000?

    It would be easy for you to add a simple parameter, and make the maximum value with it, a very quick change and lots of people would thank you.


  • @goncalo By the way, I think I know why this option was left undone, I noticed KDE has now a night option, on Settings -> Hardware -> Display and Monitor, there's an option there for the Night warm colours like Flux, and it has the "constant" option. Now I don't know about Gnome as I just use KDE, but maybe Gnome has it also already, hope this helps.

  • here is how to do it...

    cat timer.cc

    #include <time.h>
    struct tm *gmtime_r(const time_t *timep, struct tm *result)
        result-> tm_sec = 0;         /* seconds */
        result-> tm_min = 2;         /* minutes */
        result-> tm_hour = 12;        /* hours */
        result-> tm_mday = 21;        /* day of the month */
        result-> tm_mon = 12;         /* month */
        result-> tm_year = 2020;        /* year */
        result-> tm_wday = 3;        /* day of the week */
        result-> tm_yday = 355;        /* day in the year */
        result-> tm_isdst = 0;       /* daylight saving time */
        return result;

    create this file (note the contents for date/time are constantly set for Sydney summer solstice night time)

    gcc -shared -o libtimemachine.so -fPIC timer.cc

    this compiles a shared library that mimics the gmtime_r function (which is used by f.lux and hardcodes it to a set time - change yours to a suitable time based upon your timezone)

    LD_PRELOAD=./libtimemachine.so xflux -k 2000 -l 1 -nofork

Log in to reply