3

I am trying to get Redshift to work again. And it seems to fail because of geoclue2.

Here's the weird thing. Until earlier today, it worked just fine, and geoclue was not updated since December (2.5.2).

Whatever I do, I keep getting the following

geoclue[2905]: Failed to query location: Forbidden

When I run systemctl status geoclue.service.

Nothing works. Not downgrading redshift, or geoclue2, or even running as sudo the redshift process. Absolutely nothing. It all ends up in the same result: forbidden.

(Yes, I have added redshift to the geoclue.conf file at /etc/geoclue/geoclue.conf.)


I am using Arch Linux with Openbox and Xinitrc.

Ink blot
  • 203
  • 2
  • 10
  • This doesn't answer your question, but I use redshift on Arch Linux too, and what I do is compile it _without_ geoclue2 support, and use the redshift config file to set my location manually. Well, I can turn it into an answer if you want to, I'll defer to your preference ;) – cryptarch Jan 18 '19 at 19:06
  • Thanks, but manual setup is too much of a hassle. I travel quite often in a way that would require editing this much more than I care to do. – Ink blot Jan 19 '19 at 08:29

1 Answers1

10

This appears to be an issue with geoclue's use of the Mozilla location services. If you look in the /etc/geoclue/geoclue.conf, it gives you a URL to mozilla's location services including an API key. Copying this url to a browser returns 403: you have exceeded your daily limit. The API key is the same on both of my machines, so I would assume it's also the same on your machine and everyone using geoclue, and the number of people using geoclue is now high enough that they use up all of the available API calls.

I found a bug report for this on the geoclue gitlab, https://gitlab.freedesktop.org/geoclue/geoclue/issues/101, and I'll suggest this there as well.

In the meantime, you can follow the instructions in the /etc/geoclue/geoclue.conf to use Google's location services instead. This worked for me, and now Redshift is functioning again!

Edit: If you want to continue using Mozilla's location services but are encountering this issue, try editing the url=... line so that ?key=geoclue instead of key=(random hex value). I discovered that geoclue is the api key used in geoclue.conf on Linux Mint, and it reflects the default configuration file found on the Geoclue Gitlab. Maybe Manjaro/Arch are using an out-of-date configuration file with the wrong api key?

NanoExplorer
  • 116
  • 1
  • 4
  • Thanks! Apparently it works now. So I am willing to bet good money that was the issue. Thank you very much!!! – Ink blot Jan 19 '19 at 08:30
  • wrt your last paragraph: by default, Arch uses its own API key (starting with `1667`); the default geoclue key is just `geoclue`. – ash Apr 29 '19 at 22:03