Unable to connect to GeoClue. Unable to get location from provider.
Unable to start redshift 1.11 on Fedora 23 since yesterday:
$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Geolocation disabled for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.
$
This is similar to #158 but the proper fix - having both redshift.desktop and redshift-gtk.desktop files - doesn't help any more. Indeed both files are available in Fedora since #1309177 was closed:
$ rpm -qf /usr/share/applications/redshift.desktop
redshift-1.11-1.fc23.x86_64
$ rpm -qf /usr/share/applications/redshift-gtk.desktop
redshift-gtk-1.11-1.fc23.x86_64
$
Both alternative solutions work although they are supposed to be bad solutions:
- Run as
sudo redshift-gtk - Add to
/etc/geoclue/geoclue.conf:
[redshift]
allowed=true
system=false
users=
I've found location services had been turned off. After turning on location services redshift runs smoothly.
It makes sense that redshift needs a location. However instead of exiting with a cryptic error message, redshift could display a dialog to manually set a location or turn on location services.
For example gnome-maps doesn't crash when location services are not running:
- either you enter a location manually from the search bar,
- or gnome-maps offers to turn on location services in settings.
See attached screen capture of gnome-maps:

@DimitriPapadopoulos where can I "turn on location services" setting you are describing... gnome-maps doesn't work on 14.04. I presume there's an underlying package and not something inherently required about gnome-maps being installed to fix redshift's geoclue2 problems.
Gnome maps is just an example of an alternative way to handle missing location services. Other than that it is totally unrelated to redshift. I don't know about Ubuntu 14.04, I have Fedora 23 here and location services can be enabled/disabled from Settings.
As far as I can tell it is quite difficult to disable intrusive services like geoclue (location service) in Ubuntu: http://askubuntu.com/questions/106916/how-do-i-stop-geoip-from-connecting-to-the-internet-every-time-i-boot
My guess is that location services are not disabled on your Ubuntu computer. Also I have just tried an Ubuntu 14.04 workstation and gnome-maps works pretty well once installed. Something might be broken on your computer.
I decided to just install the latest build 1.11 from source and specify my lat:lon manually in the config. Personally I don't travel with my workstation across time zones .... Like ever. So dynamic geoclue calls every time redshift starts aren't really worth the struggle to resolve. Thanks for the reply @DimitriPapadopoulos
Was encountering this and have a clean fix. Currently using redshift 1.10-5ubuntu on Linux Mint 18 Sarah (straight from repo).
Installed redshift and redshift-gtk packages. Attempted to run redshift-gtk and encountered this issue. Ran redshift from command line and got:
$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to connect to GeoClue.
Unable to get location from provider.
Installed geoclue-2.0 sudo apt-get install geoclue-2.0.
Ran another time from the terminal.
Started no problems.
Exited the terminal process and started redshift-gtk, no problems.
Hope this helps someone else :beers:
@clayzermk1 Thanks for the post. Worked for me. Mint 18, MATE.
At least in the .deb, it seems like geoclue-2.0 should be a requirement of the package if it's required. It seems like the .rpm could also use a dependency based on @DimitriPapadopoulos's original post. Can anyone on a .rpm distro comment as to the minimum set of packages they had to install to get redshift to work?
@clayzermk1 thank you very much, helped me a lot. Worked perfectly for me, using Linux Mint 18 KDE
@clayzermk1 it solved for me. thanks so much.
I am still having this issue on Ubuntu 16.04. I have tried every solution advised in this thread to no avail. Any idea how I can troubleshoot this?
Based on the original post, the geo2 location provider is already installed.
So there are two solutions to this:
- Run Redshift from command line as root
sudo redshift - Turn on Location services: Goto Settings --> Privacy --> Location Services (ON/OFF)
Ok, so it is not possible to run Redshift without location services? It would be nice to be able to set the location manualy (I think I know where I am:) ). I see it as the privacy issue.
No you don't need any location service, simply pass
-l LAT:LON
as option on command line.
On Fedora 28 KDE, only thing that worked was redshift-gtk -l 0:0
On Fedora 28 Cinammon, the command redshift-gtk -l 0:0 also works Seems like recent update breaks the app.
I had this issue as well, my environment is Fish > Tmux > Guake. I had to exit Tmux within Guake and run redshift outside of Tmux. I had tried creating a new window (shell session) inside Tmux but that didn't work.
Getting almost the same error message in Debian too. geoclue-2.0 is installed. Error popup on startup:
Failed to run Redshift
Trying location provider `geoclue2'...
Unable to start GeoClue client:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied:
'redshift' disallowed, no agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.
In the terminal, no gtk:
ryan@pocketwee:~$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.
sudo same:
ryan@pocketwee:~$ sudo redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 0.
Unable to connect to GeoClue.
Unable to get location from provider.
Was suggested to start service, no go:
ryan@pocketwee:~$ systemctl --user start redshift.service
ryan@pocketwee:~$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.
What version was merge request 6 merged into? Perhaps it will resolve the issue.
FYI for Fedora 28 issue is 1585970.
I'm getting this issue on KDE 5.13.3. When I log in, I get prompted to allow location access (not something I knew KDE did) but it doesn't seem to do anything.
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Access to the current location was denied by GeoClue!
Make sure that location services are enabled and that Redshift is permitted
to use location services. See https://github.com/jonls/redshift#faq for more
information.
Unable to get location from provider.
This seems like an issue with connectivity with the external server. The error handling needs to be better around refused connections.
I'm using an Arch-based distro (Artix Linux actually - it uses OpenRC instead of SystemD) with XFCE4, and I get a prompt every time I sign in asking me whether I want redshift to be allowed to access my location. I found a notify_location preference under xfce4-notifyd in the Xfconf settings editor - and its set to 2, but I'm currently unsure if this is the right setting I'm after - and, indeed, what to set it to to auto-approve location access for redshift if it is.
I have the same problem on Arch inside KDE, I don't know how to enable location from KDE, since it seems like it's a GNOME thing.
You need patched geoclue, and make sure geoclue demo agent is running. Agent will start geoclue on demand.
I'm new to GitHub and I do not know how to post the error
I have a problem starting Redshitf in Konsole: redshift -o. And I get this:
Waiting for the current location to be available ... Unable to start GeoClue client: GDBus.Error: org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000. Access to the current location was denied by GeoClue! Make sure that location services are enabled and that Redshift is permitted to use location services. See https://github.com/jonls/redshift#faq for more information. The location of the provider could not be obtained.
Help me please :'v
@akostadinov:
You need patched geoclue, and make sure geoclue demo agent is running. Agent will start geoclue on demand.
Where can I find this patched geoclue?
Also, I'm unsure as to what you mean by geoclue demo agent.
@sbrl , read my last comment about bug fix. You need a version with the merge request applied. On Fedora 28 I'm using Fedora 29 latest Koji builds, see the bugzilla issue.
The demo agent that is part of the GeoClue distribution needs to be started unless you are running Gnome. On Fedora 28 XFCE starts it automatically. No idea about other distros and/or DEs.
Hello. In my case I think it has been solved for me by making a symbolic link of the file:
/etc/xdg/autostart/geoclue-demo-agent.desktop,
into the directory:
~/.config/autostart.
Hope it works for other people.
Also, I use Plasma as my Desktop Environment and Arch Linux as my Linux distribution.
/etc/xdg/autostart/geoclue-demo-agent.desktop
Nice! So i added (/usr/lib/geoclue-2.0/demos/agent| redshift-gtk) & to my i3-wm startup and geoclue2 is working fine. Thanks!
@Portergos , I assume you'd better change | to && or something. The | is sending agent stdout to redshift which doesn't do any good and is a potential source of trouble.