I’m trying to get redshift to work with geoclue2 but I keep getting the following error:
Jun 27 22:30:53 themis systemd[1930]: Started Redshift colour temperature adjuster.
Jun 27 22:30:53 themis redshift[26386]: Using method `randr'.
Jun 27 22:30:53 themis redshift[26386]: Waiting for initial location to become available...
Jun 27 22:30:58 themis redshift[26386]: Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Jun 27 22:30:58 themis redshift[26386]: Access to the current location was denied by GeoClue!
Jun 27 22:30:58 themis redshift[26386]: Make sure that location services are enabled and that Redshift is permitted
Jun 27 22:30:58 themis redshift[26386]: to use location services. See https://github.com/jonls/redshift#faq for more
Jun 27 22:30:58 themis redshift[26386]: information.
Jun 27 22:30:58 themis redshift[26386]: Unable to get location from provider.
Jun 27 22:30:58 themis systemd[1930]: redshift.service: Main process exited, code=exited, status=1/FAILURE
Jun 27 22:30:58 themis systemd[1930]: redshift.service: Failed with result 'exit-code'.
Here is the relevant part from my configuration.nix
:
services.redshift.enable = true;
services.geoclue2.appConfig.redshift.isAllowed = true;
What am I missing?
Just chipping in to say that I have the same problem. Seems that redshift simply can’t get my location. Also, KDE’s Night Color feature consistently reports my location as “Latitude: 0 Longitude: 0”.
In my case, I’m fairly certain the cause is this issue (I’m on a desktop with no wifi). Downgrading to 2.5.6 is a potential workaround.
If anyone wanders in, here are the steps: add these lines to configuration.nix
:
disabledModules = [ "services/desktops/geoclue2.nix" ];
imports = [
# other stuff
./my-geoclue2.nix
];
and create a file named my-geoclue.nix
with the same contents as the default module, but with this at the beginning (just after let
):
pkgs = import (builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "c92ca95afb5043bc6faa0d526460584eccff2277";
}) {};
2 Likes
Thanks for the tip. Seems 2.5.7 broke a lot of stuff.
There’s this issue too (don’t let the title distract you, the discussion is where all the interesting details are). I thought it might be related to that (since I don’t run a full blown desktop with a geoclue agent).
In any case, a downgrade works around this issue too.
I just switched to a manual location provider instead:
location = {
provider = "manual";
latitude = xxx;
longitude = xxx;
};
Hoping a future update will bring things in order again.