[GUIDE] Blue Light Filter in XFCE (Redshift)

Introduction

This guide will help you to quickly configure blue light filter in Qubes OS with XFCE desktop environment.

Redshift

Installation

type sudo qubes-dom0-update redshift in dom0 terminal and confirm installation by y

!

Remember that installing anything in dom0 is not recommended for security reasons

Configuration

Create confiig file - dom0 terminal:

  • cd .config

  • nano redshift.conf
    You will create an empty file in path ~/.config/redshift.conf. Here you have to set values:
    your location*, Day/Night Color. Here is explained sample with more functionality.
    Basic configuration looks like:

     [redshift]
     temp-day=6400
     temp-night=3200
     adjustment-method=randr
     location-provider=manual
    
     [manual]
     lat=xx.xxxxx
     lon=xx.xxxxx
    

Where xx.xxxxx are my city latitude and longitude

  • Save this configuration file
  • Type redshift in dom0 to start the program. It will load previously saved configuration.

*Location is needed to know when actually sun sets for you. Without that parameter, redshift may not work.
To find city longitude and latitude you can use geonames.org

Automation/Startup

we need to create script ~/.startupscripts/redshift.sh, open dom0 terminal

  • mkdir .startupscripts

  • cd .startupscripts

  • nano redshift.sh

  • paste:

      #!/bin/sh
      sleep 2
      redshift
    
  • save

  • chmod +x redshift.sh - (this makes script executable)

  • Add redshift to autostart in xfce settings

    Name: Redshift
    Description: Blue light filter
    Command: sh /home/USERNAME/.startupscripts/redshift.sh

Documentation

If You want to copy this to the Qubes OS documentation, sure :slight_smile: it’ll be faster to find.

8 Likes

Now that I can use redshift, this came in very handy–a simple, effective, well-written guide even for non-technical people like me.

Without this, I would’ve had to manually type redshift -O 3000 everytime I wanted to dim the screen. Thanks a bunch!

1 Like

@BBro thanks for your useful guide.

I suggest you add it to qubes-doc git repository, following the doc-guidelines

1 Like

IMPORTANT UPDATE

  • Manage Redshift using GUI on system tray. [With it you can e.g. suspend Redshift, which is painful without this tool]
  • security advice, reread whole article.

Introduction

This guide will help you to quickly configure blue light filter in Qubes OS


Redshift

Installation

type sudo qubes-dom0-update redshift in dom0 terminal and confirm installation by y
type sudo qubes-dom0-update redshift-gtk in dom0 terminal and confirm installation by y

Configuration

Create confiig file - dom0 terminal:

  • cd .config
  • nano redshift.conf
    You will create an empty file in path ~/.config/redshift.conf . Here you have to set values:
    your location*, Day/Night Color. Here is explained sample with more functionality.
 [redshift]
 temp-day=6400
 temp-night=3200
 adjustment-method=randr
 location-provider=manual

 [manual]
 lat=xx.xxxxx
 lon=xx.xxxxx

Where xx.xxxxx are my city latitude and longitude

  • Save this configuration file
  • Type redshift in dom0 to start the program. It will load previously saved configuration.

*Location is needed to know when actually sun sets for you. Without that parameter, redshift may not work. In ordinary Linux system, redshift uses location services like geoclue but i don’t know if it’ll work on qubes as dom0 shouldn’t have internet access and the location provider needs IP to determine your location. You can always check it, read the archwiki.
To find city longitude and latitude you can use geonames.org

Important Note:
I suggest not to give your true location because crackers after this guide has been written may use this file to know your location. Just pick another country that is “close” and has similar latitude.

Automation/Startup

Open dom0 terminal and type redshift-gtk, in your system tray redshift icon will appear, then click on it and mark checkbox called autostart. Reboot device.
(For these, who configured auto-start from this guide, you have to delete previously created configuration in settings and script - it’s no longer needed, and will interrupt second package)

Documentation

Notes, Moderators

It may also work on KDE, so maybe we should change the title to: [HOW-TO] Blue Light Filter

Moderators: could you please replace first post with this update content? I have no rights :slight_smile: I’ll try later to go through mentioned Qubes community documentation but believe me that I have lot of work and no time…

2 Likes

Does anyone know if a VM can detect redshift’s color change?

If a process inside a whonix VM can detect the color change, it may be able to determine a rough timezone / geographic location.

From my very limited testing, turning redshift on/off from dom0 does not seem to change pixel color values as read by a color picker installed in a VM (xcolor from https://github.com/Soft/xcolor).

Thanks for this guide!

What do you mean?

Ctrl+Z to suspend or Ctrl+C to kill the process and ‘fg’ to bring it back from suspend or simply ‘redshift’ when I want it to start again.

Thanks all for this useful information! :+1: