我无法让 Redshift 从 GeoClue2 检索地理位置信息。现在的状态是,在重新启动后并且自重新启动以来没有更改任何软件包或配置
GeoClue 服务正在运行:
$ systemctl status geoclue.service ● geoclue.service - Location Lookup Service Loaded: loaded (/usr/lib/systemd/system/geoclue.service; static; vendor preset: disabled) Active: active (running) since Wed 2018-09-05 18:49:03 NZST; 3s ago Main PID: 8489 (geoclue) Tasks: 4 (limit: 4915) Memory: 2.1M CGroup: /system.slice/geoclue.service └─8489 /usr/lib/geoclue Sep 05 18:49:03 machine systemd[1]: Starting Location Lookup Service... Sep 05 18:49:03 machine systemd[1]: Started Location Lookup Service.
软件包是最新的:
$ pacman --sync --info geoclue2 redshift Repository : extra Name : geoclue2 Version : 2.4.12-1 Description : Modular geoinformation service built on the D-Bus messaging system Architecture : x86_64 URL : https://www.freedesktop.org/wiki/Software/GeoClue/ Licenses : LGPL Groups : None Provides : None Depends On : libsoup json-glib libmm-glib avahi libnotify Optional Deps : None Conflicts With : geoclue Replaces : None Download Size : 154.42 KiB Installed Size : 1206.00 KiB Packager : Jan Alexander Steffens (heftig) <[email protected]> Build Date : Sun 02 Sep 2018 07:42:59 NZST Validated By : MD5 Sum SHA-256 Sum Signature Repository : community Name : redshift Version : 1.12-2 Description : Adjusts the color temperature of your screen according to your surroundings. Architecture : x86_64 URL : http://jonls.dk/redshift/ Licenses : GPL3 Groups : None Provides : None Depends On : geoclue2 libdrm libxcb libxxf86vm Optional Deps : python-gobject: for redshift-gtk python-xdg: for redshift-gtk gtk3: for redshift-gtk Conflicts With : None Replaces : None Download Size : 130.88 KiB Installed Size : 851.00 KiB Packager : Evangelos Foutras <[email protected]> Build Date : Tue 24 Jul 2018 03:19:05 NZST Validated By : MD5 Sum SHA-256 Sum Signature
GeoClue 配置为允许从 Redshift 进行访问:
$ tail --lines=4 /etc/geoclue/geoclue.conf [redshift] allowed=true system=false users=
但 Redshift 无法启动:
$ 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.NoReply: Message recipient disconnected from message bus without replying.
Unable to get location from provider.
用户服务展示了不同的行为:
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.
似乎有一个黑客可用于解决类似的问题 - 上面的错误消息与手动启动程序时的该页面不同 - 但我感兴趣的是是否有更永久的修复可用或正在处理。
答案1
这是 GeoClue 程序中的一个已知问题,但已被解决固定的在2.5.0版本中。升级到该版本应该可以解决您的问题。