From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:55479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu0EM-00020A-Ku for guix-patches@gnu.org; Wed, 13 Feb 2019 14:30:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu08a-00056S-Cg for guix-patches@gnu.org; Wed, 13 Feb 2019 14:24:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gu08a-00053M-1q for guix-patches@gnu.org; Wed, 13 Feb 2019 14:24:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gu08Z-0001lf-Tj for guix-patches@gnu.org; Wed, 13 Feb 2019 14:24:03 -0500 Subject: [bug#34470] [PATCH 6/8] gnu: gdm: Run dbus-daemon via a wrapper script. Resent-Message-ID: From: Timothy Sample Date: Wed, 13 Feb 2019 14:22:19 -0500 Message-Id: <20190213192221.26599-6-samplet@ngyro.com> In-Reply-To: <87o97fijyh.fsf@ngyro.com> References: <87o97fijyh.fsf@ngyro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 34470@debbugs.gnu.org * 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. (): Add 'dbus-daemon' field. (gdm-shepherd-service): Set GDM_DBUS_DAEMON before invoking gdm. --- 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 da1c976e07..3c09d6b30a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5379,6 +5379,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. @@ -5404,6 +5405,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 de5438e3fe..6a589779b9 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 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)))) @@ -696,6 +708,9 @@ makes the good ol' XlockMore usable." (list (string-append "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)) -- 2.20.1