FS#59657 - [redshift] Make geoclue2 support optional
Attached to Project:
Community Packages
Opened by Peter Wu (Lekensteyn) - Tuesday, 14 August 2018, 10:29 GMT
Last edited by Robin Candau (Antiz) - Tuesday, 02 May 2023, 09:50 GMT
Opened by Peter Wu (Lekensteyn) - Tuesday, 14 August 2018, 10:29 GMT
Last edited by Robin Candau (Antiz) - Tuesday, 02 May 2023, 09:50 GMT
|
Details
Description:
With the manual location provider (see "man redshift"), geoclue2 is no longer needed. Tested with "pacman -R --assume-installed geoclue2 geoclue2", redshift in manual mode still works. The default configuration will still try to access geoclue2 (via DBus) though, so unless you specify manual mode, you will still need geoclue. Additional info: * package version: redshift 1.12-2 |
This task depends upon
Closed by Robin Candau (Antiz)
Tuesday, 02 May 2023, 09:50 GMT
Reason for closing: Implemented
Additional comments about closing: https://github.com/archlinux/svntogit-co mmunity/commit/df7ac4c1822f6c808ff61f697 f0f38a73eb07fad
Tuesday, 02 May 2023, 09:50 GMT
Reason for closing: Implemented
Additional comments about closing: https://github.com/archlinux/svntogit-co mmunity/commit/df7ac4c1822f6c808ff61f697 f0f38a73eb07fad
$ redshift -c /dev/null
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...
^Cpoll: Interrupted system call
Unable to get location from provider.
$ redshift -c /dev/null -l manual:0:0
Using method `randr'.
Waiting for initial location to become available...
Location: 0.00 N, 0.00 E
^C
$
If the provider is specified, it will use that. Otherwise it will use a default:
Except for disabling geoclue at compile time, it will always try to use geoclue first and only then it will try manual mode.
That "fallback to manual mode" is not really a fallback. In the current implementation, it will always consider geoclue2 available. It will just watch the D-Bus forever until org.freedesktop.GeoClue2 appears (never in case not installed).
The reason why I removed geoclue is for two reasons (1) privacy, I do not need to broadcast/receive my location all times (2) a new useless "agent" daemon would somehow start every time I relogin.
Setting the location manually is recommended in some issues such as
https://github.com/jonls/redshift/issues/318
That sounds like an upstream bugreport in the making. :D As well as that, bug aside, geoclue2 would seem to be intended to be optional.
> > It will just watch the D-Bus forever until org.freedesktop.GeoClue2 appears.
>
> That sounds like an upstream bugreport in the making. :D
It could be a feature, GeoClue2 is autostarted on first use so it might not be immediately available. Some form of detection for GeoClue2 availability or a timeout could be nice though. I'll what I can do :)
[rant]
I suppose that the "agent" exists to confirm location requests from applications, though I was never asked for it. The source tree has no tests at all that check for such things.
Why does this thing need to run as root? I am glad that I got rid of it.
[/rant]
https://github.com/jonls/redshift/pull/656
Upstream is quite slow at merging PRs, but I think it shouldn't stop us from demoting geoclue2 to optional dependency, having it installed by default seems to give little to no benefits.
1: https://github.com/jonls/redshift/issues/318#issuecomment-407446604