Recently, Redshift stopped working on some of my machines. Link to heading

I was casually browsing one evening enjoying the dimly-illuminated glow of my computer screen, when I noticed that it was a bit on the blue side.

Being a bit of a night owl, I do like to tune things a bit towards the red side during the late-night hours and Redshift had worked for years without issue.

Redshift Logo

Trying to run redshift manually from the terminal, I ran into this:

Trying location provider `geoclue2'...
Using provider `geoclue2'.

Doing a bit of research, I stumbled upon this post on the Linux Mint forums by xenopeek on Tuesday, June 18th 2024:

The cause looks to be that Redshift by default automatically determines its location using the geoclue library which in turn uses the Mozilla Location Service. That service has been shut down last week on June 12.

Digging a bit further into the official Mozilla blog as well as GitHub I found confirmation that this was, in fact, the case.

I was rather surprised by this discovery since I had been totally clueless about geoclue being needed for Redshift until that point. This discovery was even more surprising given how many Linux users are privacy-focused, and location services tend to be more opt-in than opt-out in these flavors of free software (I’m looking at you next, gnome-clocks!).

Now I was feeling a bit of an internal conflict as the red and blue pixels battled each other much like the artists on the old vinyl Bloods and Crips album that’s buried somewhere in my dusty record crates.

Bloods and Crips - Bangin on Wax (1993)

Blue was winning, but I needed to give red a chance.

This also lead me to confront something else I hadn’t considered: Redshift was using local sunset/sunrise times to determine when to adjust the color of your screen. While I can certainly understand why that might make sense to some, I have yet to convince any of my clients or employers that my daily work schedule should grow longer or shorter with the changing lengths of daylight hours throughout the year.

So rather than become sleep-deprived by way of blue light exposure, I set out to sizzle away the midnight oil figuring out how to use redshift without location services.

Fortunately it’s quite easy to trigger Redshift manually, but on many Linux distributions there isn’t any GUI for it.

To go easier on the eyes at night, I opted for 3700K:

redshift -O 3700

For daytime, reset the color temperature:

redshift -x

It’s easy to create shortcuts to launch either of these commands with a single click of the taskbar. While I’d considered complicated conditional cronjobs to create a fixed schedule, I opted for something even simpler: running the commands directly and creating aliases for them.

I personally like to be able to simply type “night” or “day” into the terminal to make this happen at will, so adding these 2 lines to ~/.bashrc did the trick:

alias night='redshift -O 3700'
alias day='redshift -x'

This whole ordeal lead me down an interesting rabbit-hole about why these location services were no longer being used. Then I found out about a lawsuit launched against location providers such as Google, by a company I had never heard of, Skyhook Wireless, and all of a sudden a lot of things I’ve observed over the years began to make sense. The Wikipedia Article on Skyhook even lists the Mozilla blog post as a citation, and evidently, it seemed that Mozilla was pressured to change their location services in 2019 due to patent infringement allegations.

This made me think back to when I discovered, nearly 15 years ago now, that my iPhone 4 was constantly harvesting location information and MAC addresses of nearby devices without my consent, and storing the data on my PC with iTunes backups as an unencrypted sqlite database every time I synced. I still vividly recall the creeped-out feeling that came over me when I began examining all the data that had been recorded and stored so insecurely, leading me to think about some pretty sketchy hypothetical situations.

This type of data collection has become pretty normalized now, especially with things like AirTags, but that discovery was still somewhat shocking at the time and marked the beginning of the end of my trust for many of the large tech companies - although that’s a story for another article. []