guix-commits
[Top][All Lists]
Advanced

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

07/10: gnu: gdm: Run dbus-daemon via a wrapper script.


From: guix-commits
Subject: 07/10: gnu: gdm: Run dbus-daemon via a wrapper script.
Date: Sat, 16 Feb 2019 18:05:24 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 1f564c1573f2d120a55e3b321a0c558a51720bce
Author: Timothy Sample <address@hidden>
Date:   Wed Feb 13 14:22:19 2019 -0500

    gnu: gdm: Run dbus-daemon via a wrapper script.
    
    * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
    phase so that GDM propagates the GDM_DBUS_DAEMON variable into the
    session environment and uses its value to invoke dbus-daemon.
    * gnu/services/xorg.scm (dbus-daemon-wrapper): New variable.
    (<gdm-configuration>): Add 'dbus-daemon' field.
    (gdm-shepherd-service): Set GDM_DBUS_DAEMON before invoking gdm.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/gnome.scm |  3 +++
 gnu/services/xorg.scm  | 15 +++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index dec567a..794f3a8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5461,6 +5461,7 @@ libxml2.")
               (("DATADIR \"/gnome")
                "\"/run/current-system/profile/share/gnome"))
             (let ((propagate '("GDM_CUSTOM_CONF"
+                               "GDM_DBUS_DAEMON"
                                "GDM_X_SERVER"
                                ;; XXX: Remove this once GNOME Shell is
                                ;; a dependency of GDM.
@@ -5486,6 +5487,8 @@ libxml2.")
               (("\\(X_SERVER X_SERVER_ARG_FORMAT")
                "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")"))
             (substitute* '("daemon/gdm-x-session.c")
+              (("\"dbus-daemon\"")
+               "g_getenv (\"GDM_DBUS_DAEMON\")")
               (("X_SERVER")
                "g_getenv (\"GDM_X_SERVER\")"))
             ;; Use an absolute path for GNOME Session.
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index de5438e..6a58977 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages display-managers)
   #:use-module (gnu packages gnustep)
   #:use-module (gnu packages gnome)
@@ -623,12 +624,23 @@ makes the good ol' XlockMore usable."
          (home-directory "/var/lib/gdm")
          (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)))))
+
 (define-record-type* <gdm-configuration>
   gdm-configuration make-gdm-configuration
   gdm-configuration?
   (gdm gdm-configuration-gdm (default gdm))
   (allow-empty-passwords? gdm-configuration-allow-empty-passwords? (default 
#t))
   (auto-login? gdm-configuration-auto-login? (default #f))
+  (dbus-daemon gdm-configuration-dbus-daemon (default dbus-daemon-wrapper))
   (default-user gdm-configuration-default-user (default #f))
   (x-server gdm-configuration-x-server
             (default (xorg-wrapper))))
@@ -697,6 +709,9 @@ makes the good ol' XlockMore usable."
                             "GDM_CUSTOM_CONF="
                             #$(gdm-configuration-file config))
                            (string-append
+                            "GDM_DBUS_DAEMON="
+                            #$(gdm-configuration-dbus-daemon config))
+                           (string-append
                             "GDM_X_SERVER="
                             #$(gdm-configuration-x-server config))
                            ;; XXX: GDM requires access to a handful of



reply via email to

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