* [bug#34470] [PATCH 0/8] GDM without GNOME Desktop
@ 2019-02-13 19:09 Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 1/8] services: gdm: Remove etc service Timothy Sample
` (8 more replies)
0 siblings, 9 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:09 UTC (permalink / raw)
To: 34470
Hi Guix,
This patch series fixes up a few things with GDM. The main one is that
GDM no longer requires the GNOME Desktop service to be included in the
system services. It no longer blindly hopes that everything it needs
happens to be in “/run/current-system/profile”. Now it mostly knows
where to find its dependencies directly, and in the cases it doesn’t, it
makes sure that what it needs is in the system profile.
Around this, I did some cleaning. GDM now looks directly at its
configuration file in the store rather than at a link in “/etc”, and a
repetitive section of messy substitutions is now a loop.
I added a D-Bus wrapper script as discussed before [1]. It doesn’t do
much, but it is there to be improved if needed.
This series also includes the user X session scripts that were recently
discussed [2].
-- Tim
[1] https://lists.gnu.org/archive/html/guix-devel/2019-01/msg00047.html
[2] https://lists.gnu.org/archive/html/guix-devel/2019-02/msg00198.html
Timothy Sample (8):
services: gdm: Remove etc service.
gnu: gnome-session: Use absolute paths in .desktop files.
gnu: gdm: Add links to required login-session files.
gnu: gdm: Use absolute path for gnome-session.
gnu: gdm: Simplify pre-configure phase.
gnu: gdm: Run dbus-daemon via a wrapper script.
services: gdm: Make dependencies explicit.
services: gdm: Allow for custom X session scripts.
gnu/packages/gnome.scm | 96 +++++++++++++++++++++-------------
gnu/services/xorg.scm | 113 +++++++++++++++++++++++++----------------
2 files changed, 130 insertions(+), 79 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 1/8] services: gdm: Remove etc service.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 2/8] gnu: gnome-session: Use absolute paths in .desktop files Timothy Sample
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
* gnu/packages/gnome.scm (gdm)[arguments]: Update pre-configure phase to
make GDM get the configuration file path from an environment variable.
* gnu/services/xorg.scm (gdm-etc-service): Remove function.
(gdm-configuration-file): New function.
(gdm-shepherd-service): Set GDM_CUSTOM_CONF before invoking GDM.
(gdm-service-type)[extensions]: Remove etc-service-type extension.
---
gnu/packages/gnome.scm | 9 ++++--
gnu/services/xorg.scm | 67 ++++++++++++++++++++----------------------
2 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 367d5de16c..b2c7aa60cc 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -32,7 +32,7 @@
;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
-;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2018, 2019 Timothy Sample <samplet@ngyro.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -5380,6 +5380,9 @@ libxml2.")
;; processes.
"gdm_session_set_environment_variable (self, \"GDM_X_SERVER\",\n"
" g_getenv (\"GDM_X_SERVER\"));\n"
+ ;; Propagate the GDM_CUSTOM_CONF environment variable.
+ "gdm_session_set_environment_variable (self, \"GDM_CUSTOM_CONF\",\n"
+ " g_getenv (\"GDM_CUSTOM_CONF\"));\n"
;; FIXME: Really glib should be declaring XDG_CONFIG_DIRS as a
;; variable, but it doesn't do that right now. Anyway
;; /run/current-system/profile/share/gnome-session/sessions/gnome.desktop
@@ -5399,7 +5402,9 @@ libxml2.")
;; Look for custom GDM conf in /run/current-system.
(substitute* '("common/gdm-settings-desktop-backend.c")
(("GDM_CUSTOM_CONF")
- "\"/run/current-system/etc/gdm/custom.conf\""))
+ (string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL"
+ " ? g_getenv(\"GDM_CUSTOM_CONF\")"
+ " : GDM_CUSTOM_CONF)")))
;; Use service-supplied path to X.
(substitute* '("daemon/gdm-server.c")
(("\\(X_SERVER X_SERVER_ARG_FORMAT")
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 1efb275794..de5438e3fe 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2018, 2019 Timothy Sample <samplet@ngyro.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -633,38 +633,34 @@ makes the good ol' XlockMore usable."
(x-server gdm-configuration-x-server
(default (xorg-wrapper))))
-(define (gdm-etc-service config)
- (define gdm-configuration-file
- (mixed-text-file "gdm-custom.conf"
- "[daemon]\n"
- "#User=gdm\n"
- "#Group=gdm\n"
- (if (gdm-configuration-auto-login? config)
- (string-append
- "AutomaticLoginEnable=true\n"
- "AutomaticLogin="
- (or (gdm-configuration-default-user config)
- (error "missing default user for auto-login"))
- "\n")
- (string-append
- "AutomaticLoginEnable=false\n"
- "#AutomaticLogin=\n"))
- "#TimedLoginEnable=false\n"
- "#TimedLogin=\n"
- "#TimedLoginDelay=0\n"
- "#InitialSetupEnable=true\n"
- ;; Enable me once X is working.
- "WaylandEnable=false\n"
- "\n"
- "[debug]\n"
- "#Enable=true\n"
- "\n"
- "[security]\n"
- "#DisallowTCP=true\n"
- "#AllowRemoteAutoLogin=false\n"))
- `(("gdm" ,(file-union
- "gdm"
- `(("custom.conf" ,gdm-configuration-file))))))
+(define (gdm-configuration-file config)
+ (mixed-text-file "gdm-custom.conf"
+ "[daemon]\n"
+ "#User=gdm\n"
+ "#Group=gdm\n"
+ (if (gdm-configuration-auto-login? config)
+ (string-append
+ "AutomaticLoginEnable=true\n"
+ "AutomaticLogin="
+ (or (gdm-configuration-default-user config)
+ (error "missing default user for auto-login"))
+ "\n")
+ (string-append
+ "AutomaticLoginEnable=false\n"
+ "#AutomaticLogin=\n"))
+ "#TimedLoginEnable=false\n"
+ "#TimedLogin=\n"
+ "#TimedLoginDelay=0\n"
+ "#InitialSetupEnable=true\n"
+ ;; Enable me once X is working.
+ "WaylandEnable=false\n"
+ "\n"
+ "[debug]\n"
+ "#Enable=true\n"
+ "\n"
+ "[security]\n"
+ "#DisallowTCP=true\n"
+ "#AllowRemoteAutoLogin=false\n"))
(define (gdm-pam-service config)
"Return a PAM service for @command{gdm}."
@@ -698,6 +694,9 @@ makes the good ol' XlockMore usable."
"/bin/gdm"))
#:environment-variables
(list (string-append
+ "GDM_CUSTOM_CONF="
+ #$(gdm-configuration-file config))
+ (string-append
"GDM_X_SERVER="
#$(gdm-configuration-x-server config))
;; XXX: GDM requires access to a handful of
@@ -719,8 +718,6 @@ makes the good ol' XlockMore usable."
(const %gdm-accounts))
(service-extension pam-root-service-type
gdm-pam-service)
- (service-extension etc-service-type
- gdm-etc-service)
(service-extension dbus-root-service-type
(compose list
gdm-configuration-gdm))))
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 2/8] gnu: gnome-session: Use absolute paths in .desktop files.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 1/8] services: gdm: Remove etc service Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 3/8] gnu: gdm: Add links to required login-session files Timothy Sample
` (6 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
This makes the gnome-session .desktop files usable even if gnome-session
is not available from the PATH variable.
* gnu/packages/gnome.scm (gnome-session)[arguments]: Add a phase that
adds the absolute path of gnome-session in its .desktop files.
---
gnu/packages/gnome.scm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b2c7aa60cc..59e1011a8f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4575,6 +4575,14 @@ such as gzip tarballs.")
(out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/gnome-session")
`("PATH" ":" prefix (,(string-append glib "/bin"))))
+ #t)))
+ (add-after 'install 'add-absolute-paths-to-desktop-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (substitute* (map (lambda (x)
+ (string-append out "/share/xsessions/" x))
+ '("gnome.desktop" "gnome-xorg.desktop"))
+ (("gnome-session") (string-append out "/bin/gnome-session")))
#t))))
#:configure-flags
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 3/8] gnu: gdm: Add links to required login-session files.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 1/8] services: gdm: Remove etc service Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 2/8] gnu: gnome-session: Use absolute paths in .desktop files Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session Timothy Sample
` (5 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
* gnu/packages/gnome.scm (gdm)[arguments]: Add a phase that creates
symbolic links to required files from gnome-settings-daemon; do not set
XDG_CONFIG_DIRS in the session environment.
[inputs]: Add gnome-settings-daemon.
---
gnu/packages/gnome.scm | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 59e1011a8f..ac49ca7f2d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5391,16 +5391,6 @@ libxml2.")
;; Propagate the GDM_CUSTOM_CONF environment variable.
"gdm_session_set_environment_variable (self, \"GDM_CUSTOM_CONF\",\n"
" g_getenv (\"GDM_CUSTOM_CONF\"));\n"
- ;; FIXME: Really glib should be declaring XDG_CONFIG_DIRS as a
- ;; variable, but it doesn't do that right now. Anyway
- ;; /run/current-system/profile/share/gnome-session/sessions/gnome.desktop
- ;; requires that a number of .desktop files be present, and
- ;; these special .desktop files are in $XDG_CONFIG_DIRS (which
- ;; defaults to /etc/xdg if it's not set). Here we need to
- ;; provide a value such that the GNOME session's requirements
- ;; are met (provided GNOME is installed of course).
- "gdm_session_set_environment_variable (self, \"XDG_CONFIG_DIRS\",\n"
- " \"/run/current-system/profile/etc/xdg\");\n"
;; The session bus (which GDM will initialize from the this
;; session environment) needs to know where to find the system
;; service files.
@@ -5420,7 +5410,25 @@ libxml2.")
(substitute* '("daemon/gdm-x-session.c")
(("X_SERVER")
"g_getenv (\"GDM_X_SERVER\")"))
- #t)))))
+ #t))
+ ;; GDM needs GNOME Session to run these applications. We link
+ ;; their autostart files in `share/gdm/greeter/autostart'
+ ;; because GDM explicitly tells GNOME Session to look there.
+ ;;
+ ;; XXX: GNOME Shell should be linked here too, but currently
+ ;; GNOME Shell depends on GDM.
+ (add-after 'install 'link-autostart-files
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (autostart (string-append out "/share/gdm/"
+ "greeter/autostart"))
+ (settings (assoc-ref inputs "gnome-settings-daemon")))
+ (mkdir-p autostart)
+ (with-directory-excursion autostart
+ (for-each (lambda (desktop)
+ (symlink desktop (basename desktop)))
+ (find-files (string-append settings "/etc/xdg"))))
+ #t))))))
(native-inputs
`(("dconf" ,dconf)
("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
@@ -5433,6 +5441,7 @@ libxml2.")
`(("accountsservice" ,accountsservice)
("check" ,check) ; for testing
("elogind" ,elogind)
+ ("gnome-settings-daemon" ,gnome-settings-daemon)
("gtk+" ,gtk+)
("iso-codes" ,iso-codes)
("libcanberra" ,libcanberra)
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
` (2 preceding siblings ...)
2019-02-13 19:22 ` [bug#34470] [PATCH 3/8] gnu: gdm: Add links to required login-session files Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-16 16:14 ` Ludovic Courtès
2019-02-13 19:22 ` [bug#34470] [PATCH 5/8] gnu: gdm: Simplify pre-configure phase Timothy Sample
` (4 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
* gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
phase to substitute in the absolute path of gnome-session.
[inputs]: Add gnome-session.
---
gnu/packages/gnome.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ac49ca7f2d..fdc5b68ef6 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5349,7 +5349,7 @@ libxml2.")
(modify-phases %standard-phases
(add-before
'configure 'pre-configure
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
;; We don't have <systemd/sd-daemon.h>.
(substitute* '("common/gdm-log.c"
"daemon/gdm-server.c"
@@ -5410,6 +5410,11 @@ libxml2.")
(substitute* '("daemon/gdm-x-session.c")
(("X_SERVER")
"g_getenv (\"GDM_X_SERVER\")"))
+ ;; Use an absolute path for GNOME Session.
+ (substitute* "daemon/gdm-launch-environment.c"
+ (("\"gnome-session\"")
+ (string-append "\"" (assoc-ref inputs "gnome-session")
+ "/bin/gnome-session\"")))
#t))
;; GDM needs GNOME Session to run these applications. We link
;; their autostart files in `share/gdm/greeter/autostart'
@@ -5441,6 +5446,7 @@ libxml2.")
`(("accountsservice" ,accountsservice)
("check" ,check) ; for testing
("elogind" ,elogind)
+ ("gnome-session" ,gnome-session)
("gnome-settings-daemon" ,gnome-settings-daemon)
("gtk+" ,gtk+)
("iso-codes" ,iso-codes)
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 5/8] gnu: gdm: Simplify pre-configure phase.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
` (3 preceding siblings ...)
2019-02-13 19:22 ` [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 6/8] gnu: gdm: Run dbus-daemon via a wrapper script Timothy Sample
` (3 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
* gnu/packages/gnome.scm (gdm)[arguments]: Simplify the pre-configure phase.
---
gnu/packages/gnome.scm | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index fdc5b68ef6..da1c976e07 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5378,25 +5378,21 @@ libxml2.")
"\"/run/current-system/profile/share/wayland")
(("DATADIR \"/gnome")
"\"/run/current-system/profile/share/gnome"))
- (substitute* '("daemon/gdm-session.c")
- (("set_up_session_environment \\(self\\);")
- (string-append
- "set_up_session_environment (self);\n"
- ;; Propagate GDM_X_SERVER environment variable (which is set
- ;; by the GDM service, as it's a function of what X modules
- ;; the user decides to have available) down to worker
- ;; processes.
- "gdm_session_set_environment_variable (self, \"GDM_X_SERVER\",\n"
- " g_getenv (\"GDM_X_SERVER\"));\n"
- ;; Propagate the GDM_CUSTOM_CONF environment variable.
- "gdm_session_set_environment_variable (self, \"GDM_CUSTOM_CONF\",\n"
- " g_getenv (\"GDM_CUSTOM_CONF\"));\n"
- ;; The session bus (which GDM will initialize from the this
- ;; session environment) needs to know where to find the system
- ;; service files.
- "gdm_session_set_environment_variable (self, \"XDG_DATA_DIRS\",\n"
- " \"/run/current-system/profile/share\");\n"
- )))
+ (let ((propagate '("GDM_CUSTOM_CONF"
+ "GDM_X_SERVER"
+ ;; XXX: Remove this once GNOME Shell is
+ ;; a dependency of GDM.
+ "XDG_DATA_DIRS")))
+ (substitute* "daemon/gdm-session.c"
+ (("set_up_session_environment \\(self\\);")
+ (apply string-append
+ "set_up_session_environment (self);\n"
+ (map (lambda (name)
+ (string-append
+ "gdm_session_set_environment_variable "
+ "(self, \"" name "\","
+ "g_getenv (\"" name "\"));\n"))
+ propagate)))))
;; Look for custom GDM conf in /run/current-system.
(substitute* '("common/gdm-settings-desktop-backend.c")
(("GDM_CUSTOM_CONF")
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 6/8] gnu: gdm: Run dbus-daemon via a wrapper script.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
` (4 preceding siblings ...)
2019-02-13 19:22 ` [bug#34470] [PATCH 5/8] gnu: gdm: Simplify pre-configure phase Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 7/8] services: gdm: Make dependencies explicit Timothy Sample
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
* 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.
---
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>
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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 7/8] services: gdm: Make dependencies explicit.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
` (5 preceding siblings ...)
2019-02-13 19:22 ` [bug#34470] [PATCH 6/8] gnu: gdm: Run dbus-daemon via a wrapper script Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 8/8] services: gdm: Allow for custom X session scripts Timothy Sample
2019-02-16 23:09 ` [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Ludovic Courtès
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
This commit removes the remaining implicit dependencies that the GDM
service had on the GNOME Desktop service.
* gnu/services/xorg.scm (gdm-configuration): Add a gnome-shell-assets
field for specifying any icons or fonts that the GNOME Shell theme
needs.
(gdm-shepherd-service): Remove environment variables pointing to
'/run/current-system' and set XDG_DATA_DIRS so that it points to
'gnome-shell' and its assets.
(gdm-service-type): Extend 'profile-service-type' to ensure that
necessary fonts are installed in the system profile.
---
gnu/services/xorg.scm | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 6a589779b9..4e6f5ad44f 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -28,6 +28,7 @@
#:use-module ((gnu packages base) #:select (canonical-package))
#:use-module (gnu packages guile)
#:use-module (gnu packages xorg)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages display-managers)
@@ -642,6 +643,8 @@ makes the good ol' XlockMore usable."
(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))
+ (gnome-shell-assets gdm-configuration-gnome-shell-assets
+ (default (list adwaita-icon-theme font-cantarell)))
(x-server gdm-configuration-x-server
(default (xorg-wrapper))))
@@ -714,13 +717,16 @@ makes the good ol' XlockMore usable."
(string-append
"GDM_X_SERVER="
#$(gdm-configuration-x-server config))
- ;; XXX: GDM requires access to a handful of
- ;; programs and components from Gnome (gnome-shell,
- ;; dbus, and gnome-session among others). The
- ;; following variables only work provided Gnome is
- ;; installed.
- "XDG_DATA_DIRS=/run/current-system/profile/share"
- "PATH=/run/current-system/profile/bin"))))
+ (string-append
+ "XDG_DATA_DIRS="
+ ((lambda (ls) (string-join ls ":"))
+ (map (lambda (path)
+ (string-append path "/share"))
+ ;; XXX: Remove gnome-shell below when GDM
+ ;; can depend on GNOME Shell directly.
+ (cons #$gnome-shell
+ '#$(gdm-configuration-gnome-shell-assets
+ config)))))))))
(stop #~(make-kill-destructor))
(respawn? #t))))
@@ -733,6 +739,8 @@ makes the good ol' XlockMore usable."
(const %gdm-accounts))
(service-extension pam-root-service-type
gdm-pam-service)
+ (service-extension profile-service-type
+ gdm-configuration-gnome-shell-assets)
(service-extension dbus-root-service-type
(compose list
gdm-configuration-gdm))))
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 8/8] services: gdm: Allow for custom X session scripts.
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
` (6 preceding siblings ...)
2019-02-13 19:22 ` [bug#34470] [PATCH 7/8] services: gdm: Make dependencies explicit Timothy Sample
@ 2019-02-13 19:22 ` Timothy Sample
2019-02-16 23:09 ` [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Ludovic Courtès
8 siblings, 0 replies; 15+ messages in thread
From: Timothy Sample @ 2019-02-13 19:22 UTC (permalink / raw)
To: 34470
* gnu/packages/gnome.scm (gdm)[arguments]: Update pre-configure phase so
that GDM runs an X session script specified by the variable
GDM_X_SESSION; remove the '--enable-gdm-xsession' configuration
option.
* gnu/services/xorg.scm (<gdm-configuration>): Add 'x-session' field.
(gdm-shepherd-service): Set the GDM_X_SESSION variable.
---
gnu/packages/gnome.scm | 9 ++++-----
gnu/services/xorg.scm | 7 ++++++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3c09d6b30a..a4563617d9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5328,10 +5328,6 @@ libxml2.")
;; service for TTY 1 before starting GDM).
"--with-initial-vt=7"
- ;; By default, GDM expects distributions to install a custom Xsession
- ;; script. It provides a generic one if --enable-gdm-xsession is set.
- "--enable-gdm-xsession"
-
;; Use '/etc/environment' for locale settings instead of the
;; systemd-specific '/etc/locale.conf'.
"--with-lang-file=/etc/environment"
@@ -5381,6 +5377,7 @@ libxml2.")
(let ((propagate '("GDM_CUSTOM_CONF"
"GDM_DBUS_DAEMON"
"GDM_X_SERVER"
+ "GDM_X_SESSION"
;; XXX: Remove this once GNOME Shell is
;; a dependency of GDM.
"XDG_DATA_DIRS")))
@@ -5408,7 +5405,9 @@ libxml2.")
(("\"dbus-daemon\"")
"g_getenv (\"GDM_DBUS_DAEMON\")")
(("X_SERVER")
- "g_getenv (\"GDM_X_SERVER\")"))
+ "g_getenv (\"GDM_X_SERVER\")")
+ (("GDMCONFDIR \"/Xsession\"")
+ "g_getenv (\"GDM_X_SESSION\")"))
;; Use an absolute path for GNOME Session.
(substitute* "daemon/gdm-launch-environment.c"
(("\"gnome-session\"")
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 4e6f5ad44f..f7d07b309e 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -646,7 +646,9 @@ makes the good ol' XlockMore usable."
(gnome-shell-assets gdm-configuration-gnome-shell-assets
(default (list adwaita-icon-theme font-cantarell)))
(x-server gdm-configuration-x-server
- (default (xorg-wrapper))))
+ (default (xorg-wrapper)))
+ (x-session gdm-configuration-x-session
+ (default (xinitrc))))
(define (gdm-configuration-file config)
(mixed-text-file "gdm-custom.conf"
@@ -717,6 +719,9 @@ makes the good ol' XlockMore usable."
(string-append
"GDM_X_SERVER="
#$(gdm-configuration-x-server config))
+ (string-append
+ "GDM_X_SESSION="
+ #$(gdm-configuration-x-session config))
(string-append
"XDG_DATA_DIRS="
((lambda (ls) (string-join ls ":"))
--
2.20.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session.
2019-02-13 19:22 ` [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session Timothy Sample
@ 2019-02-16 16:14 ` Ludovic Courtès
2019-02-17 15:13 ` Timothy Sample
0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2019-02-16 16:14 UTC (permalink / raw)
To: Timothy Sample; +Cc: 34470
Hi!
Timothy Sample <samplet@ngyro.com> skribis:
> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
> phase to substitute in the absolute path of gnome-session.
> [inputs]: Add gnome-session.
This patch means that we’re pulling in GNOME even when we don’t actually
need it:
--8<---------------cut here---------------start------------->8---
$ guix size gdm |tail -1
total: 909.4 MiB
$ guix size gdm gnome-session |tail -1
total: 1011.8 MiB
--8<---------------cut here---------------end--------------->8---
Do you think we could avoid that?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 0/8] GDM without GNOME Desktop
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
` (7 preceding siblings ...)
2019-02-13 19:22 ` [bug#34470] [PATCH 8/8] services: gdm: Allow for custom X session scripts Timothy Sample
@ 2019-02-16 23:09 ` Ludovic Courtès
8 siblings, 0 replies; 15+ messages in thread
From: Ludovic Courtès @ 2019-02-16 23:09 UTC (permalink / raw)
To: Timothy Sample; +Cc: 34470
Hello,
Timothy Sample <samplet@ngyro.com> skribis:
> services: gdm: Remove etc service.
> gnu: gnome-session: Use absolute paths in .desktop files.
> gnu: gdm: Add links to required login-session files.
> gnu: gdm: Use absolute path for gnome-session.
> gnu: gdm: Simplify pre-configure phase.
> gnu: gdm: Run dbus-daemon via a wrapper script.
> services: gdm: Make dependencies explicit.
> services: gdm: Allow for custom X session scripts.
Very nice! I’ve pushed everything but patch #4 (“Use absolute path for
gnome-session.”) for the reason given in my other message.
Let’s see if we can avoid it this last patch.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session.
2019-02-16 16:14 ` Ludovic Courtès
@ 2019-02-17 15:13 ` Timothy Sample
2019-03-04 10:38 ` Ludovic Courtès
0 siblings, 1 reply; 15+ messages in thread
From: Timothy Sample @ 2019-02-17 15:13 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 34470
Hi Ludo,
Ludovic Courtès <ludo@gnu.org> writes:
> Hi!
>
> Timothy Sample <samplet@ngyro.com> skribis:
>
>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>> phase to substitute in the absolute path of gnome-session.
>> [inputs]: Add gnome-session.
>
> This patch means that we’re pulling in GNOME even when we don’t actually
> need it:
>
> $ guix size gdm |tail -1
> total: 909.4 MiB
> $ guix size gdm gnome-session |tail -1
> total: 1011.8 MiB
>
> Do you think we could avoid that?
My understanding is that the login screen is more or less a normal user
session brought up by gnome-session for the “gdm” user. Shy of
re-implementing the parts of gnome-session we need, I don’t have any
ideas on how to avoid this dependency. I know that GDM sends it a list
of components to initialize (e.g., GNOME Shell), but I don’t know what
else it does for GDM.
My guess is that it would be possible to trim down some of these
packages to recover the space. GDM is very heavy-weight software, but
1G seems like a lot.
:(
-- Tim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session.
2019-02-17 15:13 ` Timothy Sample
@ 2019-03-04 10:38 ` Ludovic Courtès
2019-03-04 16:47 ` Timothy Sample
0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2019-03-04 10:38 UTC (permalink / raw)
To: Timothy Sample; +Cc: 34470
Hi Timothy,
Timothy Sample <samplet@ngyro.com> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi!
>>
>> Timothy Sample <samplet@ngyro.com> skribis:
>>
>>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>>> phase to substitute in the absolute path of gnome-session.
>>> [inputs]: Add gnome-session.
>>
>> This patch means that we’re pulling in GNOME even when we don’t actually
>> need it:
>>
>> $ guix size gdm |tail -1
>> total: 909.4 MiB
>> $ guix size gdm gnome-session |tail -1
>> total: 1011.8 MiB
>>
>> Do you think we could avoid that?
>
> My understanding is that the login screen is more or less a normal user
> session brought up by gnome-session for the “gdm” user. Shy of
> re-implementing the parts of gnome-session we need, I don’t have any
> ideas on how to avoid this dependency. I know that GDM sends it a list
> of components to initialize (e.g., GNOME Shell), but I don’t know what
> else it does for GDM.
GDM does seem to work without that dependency though (on current
master); or is there missing functionality?
If we must have it though, let’s have it, and we can then see how to
trim that closure.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session.
2019-03-04 10:38 ` Ludovic Courtès
@ 2019-03-04 16:47 ` Timothy Sample
2019-03-04 21:08 ` bug#34470: " Ludovic Courtès
0 siblings, 1 reply; 15+ messages in thread
From: Timothy Sample @ 2019-03-04 16:47 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 34470
Hi Ludo,
Ludovic Courtès <ludo@gnu.org> writes:
> [...]
>
>>>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>>>> phase to substitute in the absolute path of gnome-session.
>>>> [inputs]: Add gnome-session.
>
> [...]
>
> GDM does seem to work without that dependency though (on current
> master); or is there missing functionality?
It turns out you committed this patch to master as
def6d6b61685f69421df80cb524ba94da5dadd42.
If I revert the commit, GDM does not work (without GNOME installed in
the system profile).
If there is a way to work around GNOME Session, I’m not clever enough to
think of it. :(
> If we must have it though, let’s have it, and we can then see how to
> trim that closure.
I looked at this briefly when you first brought it up, because I thought
there would be something blindingly obvious that I could cut out.
Unfortunately, I didn’t find anything. It probably can be tightened up,
it just needs to examined a bit more carefully.
-- Tim
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#34470: [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session.
2019-03-04 16:47 ` Timothy Sample
@ 2019-03-04 21:08 ` Ludovic Courtès
0 siblings, 0 replies; 15+ messages in thread
From: Ludovic Courtès @ 2019-03-04 21:08 UTC (permalink / raw)
To: Timothy Sample; +Cc: 34470-done
Hello!
Timothy Sample <samplet@ngyro.com> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> [...]
>>
>>>>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>>>>> phase to substitute in the absolute path of gnome-session.
>>>>> [inputs]: Add gnome-session.
>>
>> [...]
>>
>> GDM does seem to work without that dependency though (on current
>> master); or is there missing functionality?
>
> It turns out you committed this patch to master as
> def6d6b61685f69421df80cb524ba94da5dadd42.
Oh, true; two weeks of vacations and everything is forgotten. :-)
> If I revert the commit, GDM does not work (without GNOME installed in
> the system profile).
>
> If there is a way to work around GNOME Session, I’m not clever enough to
> think of it. :(
Alright, well so be it.
Then I guess the next step is to stare at ‘guix size gdm’ in search of
ways to trim the closure. It might not be that hard actually:
--8<---------------cut here---------------start------------->8---
$ guix size gdm |head
store item total self
/gnu/store/bvnj04sqiwc1gcis29swk6likyc5dw8f-llvm-6.0.1 268.1 104.5 7.7%
/gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0 161.9 93.7 6.9%
/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0 182.8 74.6 5.5%
/gnu/store/j6g996l8kxxv8c76a9c61n3gi4s0wvdr-mesa-18.3.1 360.5 63.8 4.7%
/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0 146.3 58.2 4.3%
/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15 163.6 56.6 4.2%
/gnu/store/fh42kncsw279yn24kcqiydmqbzg3iv3a-mozjs-52.0-1.6507e63 209.6 54.0 4.0%
/gnu/store/f2y93basw0ykg7spgxbxsy95l64fhbc9-gtk+-3.24.2 702.4 45.5 3.4%
/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4 121.9 44.4 3.3%
--8<---------------cut here---------------end--------------->8---
That GCC is out of place and that LLVM is surely too big.
>> If we must have it though, let’s have it, and we can then see how to
>> trim that closure.
>
> I looked at this briefly when you first brought it up, because I thought
> there would be something blindingly obvious that I could cut out.
> Unfortunately, I didn’t find anything. It probably can be tightened up,
> it just needs to examined a bit more carefully.
Yup, we’ll see.
Closing this issue now anyway.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-03-04 21:14 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-13 19:09 [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 1/8] services: gdm: Remove etc service Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 2/8] gnu: gnome-session: Use absolute paths in .desktop files Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 3/8] gnu: gdm: Add links to required login-session files Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 4/8] gnu: gdm: Use absolute path for gnome-session Timothy Sample
2019-02-16 16:14 ` Ludovic Courtès
2019-02-17 15:13 ` Timothy Sample
2019-03-04 10:38 ` Ludovic Courtès
2019-03-04 16:47 ` Timothy Sample
2019-03-04 21:08 ` bug#34470: " Ludovic Courtès
2019-02-13 19:22 ` [bug#34470] [PATCH 5/8] gnu: gdm: Simplify pre-configure phase Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 6/8] gnu: gdm: Run dbus-daemon via a wrapper script Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 7/8] services: gdm: Make dependencies explicit Timothy Sample
2019-02-13 19:22 ` [bug#34470] [PATCH 8/8] services: gdm: Allow for custom X session scripts Timothy Sample
2019-02-16 23:09 ` [bug#34470] [PATCH 0/8] GDM without GNOME Desktop Ludovic Courtès
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).