Bug 1200355 - redshift: access to the current location was denied by GeoClue
redshift: access to the current location was denied by GeoClue
Status: RESOLVED DUPLICATE of bug 1093592
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: X11 Applications
Leap 15.4
x86-64 openSUSE Leap 15.4
: P5 - None : Normal (vote)
: ---
Assigned To: Tejas Guruswamy
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-08 18:05 UTC by Moritz Duge
Modified: 2022-11-20 08:03 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Duge 2022-06-08 18:05:34 UTC
redshift and redshift-gtk don't work on openSUSE-LEAP-15.4.
This was working on openSUSE-LEAP-15.3, so it's an regression.

Error:
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!

Related Tumbleweed bug (contains a workaround and more information):
Bug 1093592
Comment 2 Tejas Guruswamy 2022-06-13 16:01:02 UTC
If this is really just an issue with the GeoClue permissions there's nothing redshift can directly do about it. Either users need to add permissions manually (there is no scope for a drop-in file from redshift) or GeoClue maintainers need to add redshift as default-allowed.

But I am curious, because I don't see right now where the GeoClue permissions have changed between 15.3 and 15.4. So how was it working before?
Comment 3 Moritz Duge 2022-06-13 16:18:10 UTC
(In reply to Tejas Guruswamy from comment #2)
> If this is really just an issue with the GeoClue permissions there's nothing
> redshift can directly do about it. Either users need to add permissions
> manually (there is no scope for a drop-in file from redshift) or GeoClue
> maintainers need to add redshift as default-allowed.

If there would be a /etc/geoclue/geoclue.conf.d/ Redshift could add it's own permission config. But because there is only a /etc/geoclue/geoclue.conf I guess the GeoClue maintainers must have a look at this ticket.


> But I am curious, because I don't see right now where the GeoClue
> permissions have changed between 15.3 and 15.4. So how was it working before?

I can't answer that. I can only say, that it works on an openSUSE 15.3 system, but doesn't work with 15.4.
You can simply test it using a 15.3 and a 15.4 live cd.
https://download.opensuse.org/distribution/leap/15.3/live/
https://download.opensuse.org/distribution/leap/15.4/live/
Comment 4 Tejas Guruswamy 2022-06-14 05:10:01 UTC
Yes, I am doing some investigation to understand the root cause and will push this up to the GeoClue maintainers if needed. In the meantime could you please confirm that on your system that manual permissions added to geoclue.conf fixes the problem?

    [redshift]
    allowed=true
    system=false
    users=
Comment 5 Moritz Duge 2022-06-14 15:30:27 UTC
(In reply to Tejas Guruswamy from comment #4)
> [...] In the meantime could you please confirm that on your system 
> that manual permissions added to geoclue.conf fixes the problem?
> 
>     [redshift]
>     allowed=true
>     system=false
>     users=

Actually further investigations showed a quite strange behavior.
That setting for the geoclue.conf seems not to help at all.
But the geoclue sometimes just works if I start it again after the crash.

I guess it's more efficient if you take your time and reproduce it yourself.
It's pretty easy to reproduce it using the live cd.
The bug appears on every openSUSE-15.4 system I tried. And I'm neither a RedShift nor a GeoClue developer. So I don't have any special insights.
If you unexpectedly can't reproduce it I'll gladly help!


Using the KDE live cd right after booting. Same with and without modified geoclue.conf.
Also waiting some time after boot before starting RedShift change the behavior.
In any case the first RedShift start always fails. And sometimes the second RedShift start also fails, but then the third works fine.
########################################
linux@localhost:~> uptime
 11:23:45  up   0:02,  3 users,  load average: 0.91, 0.44, 0.17
linux@localhost:~> redshift 
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.
linux@localhost:~> redshift 
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...
Location: 53.56 N, 9.96 E
########################################
Comment 6 Tejas Guruswamy 2022-11-20 08:03:56 UTC
See comments in #1093592. This is essentially a GeoClue2 bug which has been fixed in 2.6.0.

*** This bug has been marked as a duplicate of bug 1093592 ***