unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52829: GNOME Bluetooth integration is broken
@ 2021-12-27 18:54 Mathieu Othacehe
  2022-01-04  8:17 ` bug#52829: bug#32166: GNOME Settings panel for Bluetooth dysfunctional Mathieu Othacehe
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2021-12-27 18:54 UTC (permalink / raw)
  To: 52829

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


Hello,

Using the bluetooth-service and blueman, I can manage to connect to
bluetooth devices. However, the "Bluetooth" section in the GNOME
settings reports: "No Bluetooth Found", as can be seen in the attached
capture.

Thanks,

Mathieu

[-- Attachment #2: Screenshot from 2021-12-27 19-54-15.png --]
[-- Type: image/png, Size: 34092 bytes --]

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

* bug#52829: bug#32166: GNOME Settings panel for Bluetooth dysfunctional
  2021-12-27 18:54 bug#52829: GNOME Bluetooth integration is broken Mathieu Othacehe
@ 2022-01-04  8:17 ` Mathieu Othacehe
  2022-01-06  8:29   ` bug#52829: GNOME Bluetooth integration is broken Mathieu Othacehe
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2022-01-04  8:17 UTC (permalink / raw)
  To: 52829; +Cc: 32166

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


Hello,

> Using the bluetooth-service and blueman, I can manage to connect to
> bluetooth devices. However, the "Bluetooth" section in the GNOME
> settings reports: "No Bluetooth Found", as can be seen in the attached
> capture.

Took me some times to figure it out, but the attached patches do fix the
issue. In short, gnome-settings-daemon needs a RW access to
/dev/rfkill.

It installs an udev rule to add an uaccess tag to the /dev/rfkill
device. Then elogind takes care of modifying the file ACL accordingly.

Two things were broken:

1. The gnome-settings-daemon udev path was wrong.

2. The gnome service didn't registered the udev rules installed by the
gnome-settings-daemon.

I now have, as intended:

--8<---------------cut here---------------start------------->8---
mathieu@meije ~$ getfacl /dev/rfkill 
getfacl: Removing leading '/' from absolute path names
# file: dev/rfkill
# owner: root
# group: root
user::rw-
user:mathieu:rw-
group::rw-
mask::rw-
other::r--
--8<---------------cut here---------------end--------------->8---

Thanks,

Mathieu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-gnome-settings-daemon-Fix-udev-directory.patch --]
[-- Type: text/x-patch, Size: 1072 bytes --]

From 8ba28c5b1fe65c469bb0ce041f43159f9f136202 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Mon, 3 Jan 2022 20:21:11 +0100
Subject: [PATCH 1/2] gnu: gnome-settings-daemon: Fix udev directory.

* gnu/packages/gnome.scm (gnome-settings-daemon)[arguments]
{#:configure-flags}: Fix the udev directory.
---
 gnu/packages/gnome.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f7f00100b3..a472e66358 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5577,8 +5577,7 @@ (define-public gnome-settings-daemon
        #:glib-or-gtk? #t
        #:configure-flags
        (list (string-append "-Dudev_dir="
-                            (assoc-ref %outputs "out")
-                            "/lib/udev/rules.d/")
+                            (assoc-ref %outputs "out") "/lib/udev")
              "-Dsystemd=false"
              ;; Otherwise, the RUNPATH will lack the final path component.
              (string-append "-Dc_link_args=-Wl,-rpath="
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-services-gnome-Add-udev-rules.patch --]
[-- Type: text/x-patch, Size: 2377 bytes --]

From fb60e647dcd92e294c33fdb4293f6c69290d260f Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Mon, 3 Jan 2022 20:22:02 +0100
Subject: [PATCH 2/2] services: gnome: Add udev rules.

Fixes: <https://issues.guix.gnu.org/32166>.

* gnu/services/desktop.scm (gnome-packages, gnome-udev-rules): New procedures.
(gnome-polkit-settings): Use the gnome-packages procedure.
(gnome-desktop-service-type): Add an udev service extension.
---
 gnu/services/desktop.scm | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index c6761ca784..c2ee3a3d80 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -868,22 +868,34 @@ (define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
   gnome-desktop-configuration?
   (gnome gnome-package (default gnome)))
 
-(define (gnome-polkit-settings config)
-  "Return the list of GNOME dependencies that provide polkit actions and
-rules."
+(define (gnome-packages config packages)
+  "Return the list of GNOME dependencies from CONFIG which names are part of
+the given PACKAGES list."
   (let ((gnome (gnome-package config)))
     (map (lambda (name)
            ((package-direct-input-selector name) gnome))
-         '("gnome-settings-daemon"
-           "gnome-control-center"
-           "gnome-system-monitor"
-           "gvfs"))))
+         packages)))
+
+(define (gnome-udev-rules config)
+  "Return the list of GNOME dependencies that provide udev rules."
+  (gnome-packages config '("gnome-settings-daemon")))
+
+(define (gnome-polkit-settings config)
+  "Return the list of GNOME dependencies that provide polkit actions and
+rules."
+  (gnome-packages config
+                  '("gnome-settings-daemon"
+                    "gnome-control-center"
+                    "gnome-system-monitor"
+                    "gvfs")))
 
 (define gnome-desktop-service-type
   (service-type
    (name 'gnome-desktop)
    (extensions
-    (list (service-extension polkit-service-type
+    (list (service-extension udev-service-type
+                             gnome-udev-rules)
+          (service-extension polkit-service-type
                              gnome-polkit-settings)
           (service-extension profile-service-type
                              (compose list
-- 
2.34.0


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

* bug#52829: GNOME Bluetooth integration is broken
  2022-01-04  8:17 ` bug#52829: bug#32166: GNOME Settings panel for Bluetooth dysfunctional Mathieu Othacehe
@ 2022-01-06  8:29   ` Mathieu Othacehe
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Othacehe @ 2022-01-06  8:29 UTC (permalink / raw)
  To: 52829-done


> It installs an udev rule to add an uaccess tag to the /dev/rfkill
> device. Then elogind takes care of modifying the file ACL accordingly.

Pushed, thanks!

Mathieu




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

end of thread, other threads:[~2022-01-06  8:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 18:54 bug#52829: GNOME Bluetooth integration is broken Mathieu Othacehe
2022-01-04  8:17 ` bug#52829: bug#32166: GNOME Settings panel for Bluetooth dysfunctional Mathieu Othacehe
2022-01-06  8:29   ` bug#52829: GNOME Bluetooth integration is broken Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).