unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* redshift and geoclue not working together
@ 2021-02-08  1:29 Göktuğ Kayaalp
  0 siblings, 0 replies; 2+ messages in thread
From: Göktuğ Kayaalp @ 2021-02-08  1:29 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 3368 bytes --]

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 #2: User manifest (for guix package -m user.scm) --]
[-- Type: application/octet-stream, Size: 3323 bytes --]

[-- Attachment #3: System configuration that contains the operating-system form --]
[-- Type: application/octet-stream, Size: 2855 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: redshift and geoclue not working together
@ 2021-02-14  9:20 Göktuğ Kayaalp
  0 siblings, 0 replies; 2+ messages in thread
From: Göktuğ Kayaalp @ 2021-02-14  9:20 UTC (permalink / raw)
  To: help-guix

I have encountered and solved this problem on a Debian system, and
posting the solution in the hopes that it’s useful to someone dealing
with the same problem.

Apparently you don’t need to fiddle with geoclue-service configuration,
as the user apps can’t connect to the service directly.  Instead, you
need a steward process that handles the connection within the user
session.  I think for Gnome and Gnome-like desktop, it’s gnome-shell
that does this, but the executable ‘geoclue-2.0/demos/agent’ can do it
for you for your non-Gnome desktops.  You want it to run in the
background.

I haven’t tested this on a GuixSD system yet, and if there’s any
differences, I’ll report it here.

Best,

        -gk.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-14  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  1:29 redshift and geoclue not working together Göktuğ Kayaalp
2021-02-14  9:20 Göktuğ Kayaalp

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git