help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

redshift and geoclue not working together


From: Göktuğ Kayaalp
Subject: redshift and geoclue not working together
Date: Mon, 08 Feb 2021 04:29:12 +0300

Hi all,

For the last few hours I’ve been trying to have redshift(-gtk) work with
geoclue. The relevant bit in my operating-system form is as follows:

  (cons* ;; ...
         (geoclue-service
          #:applications
          (cons* (geoclue-application "redshift-gtk" #:allowed? #t #:system? #t)
                 (geoclue-application "redshift" #:allowed? #t #:system? #t)
                 (geoclue-application "emacs" #:allowed? #t)
                 %standard-geoclue-applications))
         ;; ...
         (remove (lambda (s) (or (eq? (service-kind s) gdm-service-type)
                                 (eq? (service-kind s) geoclue-service-type)
                                 (eq? (service-kind s) slim-service-type)
                                 (eq? (service-kind s) sane-service-type)))
                 %desktop-services)))


On the user side I install packages geoclue, redshift, and
redshift:gtk.  It behaves as follows:

When redshift-gtk is run from .xsession, the icon appears on the system
tray, but nothing happens. When I click on the icon, the following error
message appears in a dialog box:

Failed to run redshift
Trying location provider `geoclue2'
Waiting for initial location to become available...
poll: interrupted system call
Unable to get location from provider.

This leads to following errors to appear in the user Xorg log:

(geoclue:3744) Geoclue-WARNING **: <date>: Failed to create query: no
WiFi devices available
(geoclue:3744) Geoclue-WARNING **: <date>: Failed to create query:
TLS/SSL support not available; install glib-networking

The said package on the last line is an input of geoclue, and I’ve tried
manually installing it as the user too (guix package -i glib-networking).

When I run the command line program, the output is as follows:

[In: ~/cf; Mon Feb 08 04:08; on branch master#; ^1]
[7] g@guixtest (0)$ DISPLAY=:0 redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...

After that last line it sits indefinitely, and in Xorg logs (i.e. on
tty1 when slim is active on tty7) I observe the same error lines about
WiFi and TLS as above.

When I run either redshift or redshift-gtk with command line with the -l
option, manually specifying latitude and longitude info, everything
works fine.

I’ve checked the implementation, and geoclue-service uses Mozilla’s
API.  I’ve compared the URL with the one in my Linux Mint machine’s
config, and they are the same URLs.

I’ve also tried installing redshift not in user manifest but through the
operating-system form, again, to no avail.

The demo applications that come with geoclue just timeout
(find /gnu/store -name \*where-am-i).

This is not a huge issue as I can just set an environment variable and
use it from redshift and Emacs, but ideally I wouldn’t be setting this
manually because while the current GuixSD setup I’m working on is
destined towards an immobile desktop system, I wish to attempt
converting my laptop later on too.

Has any of you been able to get geoclue working, or does anybody know if
this is a mistaken setup on my part or a bug somewhere?

Thanks in advance,

       -gk.

P.S.: I attach the relevant configuration files for reference.

Attachment: user.scm
Description: User manifest (for guix package -m user.scm)

Attachment: system.scm
Description: System configuration that contains the operating-system form


reply via email to

[Prev in Thread] Current Thread [Next in Thread]