all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Timothy Sample <samplet@ngyro.com>
To: 35641@debbugs.gnu.org
Subject: [bug#35641] [PATCH] services: gdm: Include user profile in D-Bus paths.
Date: Wed, 08 May 2019 14:59:50 -0400	[thread overview]
Message-ID: <87v9yksrfd.fsf@ngyro.com> (raw)

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

Hi Guix,

I avoided doing this when fixing up GDM because it seemed a little
ham-fisted (clumsy).  However, I think it is better than all the ink
that would be spilled on help-guix without it.

In short, the point is to make sure that D-Bus services included in a
user’s profile can be found and started by the session bus.  This means
that if you are using GDM and install “evolution-data-server” and
“gnome-calendar” (for example), the session bus will be able to start
all of the services that GNOME Calendar needs to function correctly.
There are a handful of major GNOME applications that need this.

Furthermore, I think we should add “evolution-data-server” as a
propagated input for packages that require it.  This way, things like
“guix install evolution” will just work the way one expects.

Is it okay to assume that “.guix-profile” is the user’s profile like
this?  If it isn’t okay in general, is it okay enough for now?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-gdm-Include-user-profile-in-D-Bus-paths.patch --]
[-- Type: text/x-patch, Size: 2203 bytes --]

From e32c27dfa950d250520c3c8ecccba90add863639 Mon Sep 17 00:00:00 2001
From: Timothy Sample <samplet@ngyro.com>
Date: Wed, 8 May 2019 09:13:14 -0400
Subject: [PATCH] services: gdm: Include user profile in D-Bus paths.

This partially addresses <https://bugs.gnu.org/35267>.

* gnu/services/xorg.scm (dbus-daemon-wrapper): When '$HOME' is set,
include directories from '$HOME/.guix-profile' in the search paths of
the D-Bus daemon.
---
 gnu/services/xorg.scm | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 65e9d48915..027524f11d 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -767,14 +767,24 @@ the GNOME desktop environment.")
          (shell (file-append shadow "/sbin/nologin")))))
 
 (define dbus-daemon-wrapper
-  (program-file "gdm-dbus-wrapper"
-                #~(begin
-                    (setenv "XDG_CONFIG_DIRS"
-                            "/run/current-system/profile/etc/xdg")
-                    (setenv "XDG_DATA_DIRS"
-                            "/run/current-system/profile/share")
-                    (apply execl (string-append #$dbus "/bin/dbus-daemon")
-                           (program-arguments)))))
+  (program-file
+   "gdm-dbus-wrapper"
+   #~(begin
+       (use-modules (srfi srfi-26))
+       (let* ((system-profile "/run/current-system/profile")
+              (user-profile (and=> (getenv "HOME")
+                                   (cut string-append <> "/.guix-profile")))
+              (profiles (if user-profile
+                            (list user-profile system-profile)
+                            (list system-profile))))
+         (setenv "XDG_CONFIG_DIRS"
+                 (string-join (map (cut string-append <> "/etc/xdg") profiles)
+                              ":"))
+         (setenv "XDG_DATA_DIRS"
+                 (string-join (map (cut string-append <> "/share") profiles)
+                              ":"))
+         (apply execl (string-append #$dbus "/bin/dbus-daemon")
+                (program-arguments))))))
 
 (define-record-type* <gdm-configuration>
   gdm-configuration make-gdm-configuration
-- 
2.21.0


             reply	other threads:[~2019-05-08 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 18:59 Timothy Sample [this message]
2019-05-10 13:14 ` [bug#35641] [PATCH] services: gdm: Include user profile in D-Bus paths Ludovic Courtès
2019-05-11 17:45   ` bug#35641: " Timothy Sample
2019-05-12 21:17     ` [bug#35641] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9yksrfd.fsf@ngyro.com \
    --to=samplet@ngyro.com \
    --cc=35641@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.