services: gdm: Allow for custom X session scripts.

* 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.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Timothy Sample 2019-02-13 14:22:21 -05:00 committed by Ludovic Courtès
parent 7e61419892
commit 41fa9f1815
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 10 additions and 6 deletions

View File

@ -5410,10 +5410,6 @@ libxml2.")
;; service for TTY 1 before starting GDM). ;; service for TTY 1 before starting GDM).
"--with-initial-vt=7" "--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 ;; Use '/etc/environment' for locale settings instead of the
;; systemd-specific '/etc/locale.conf'. ;; systemd-specific '/etc/locale.conf'.
"--with-lang-file=/etc/environment" "--with-lang-file=/etc/environment"
@ -5463,6 +5459,7 @@ libxml2.")
(let ((propagate '("GDM_CUSTOM_CONF" (let ((propagate '("GDM_CUSTOM_CONF"
"GDM_DBUS_DAEMON" "GDM_DBUS_DAEMON"
"GDM_X_SERVER" "GDM_X_SERVER"
"GDM_X_SESSION"
;; XXX: Remove this once GNOME Shell is ;; XXX: Remove this once GNOME Shell is
;; a dependency of GDM. ;; a dependency of GDM.
"XDG_DATA_DIRS"))) "XDG_DATA_DIRS")))
@ -5490,7 +5487,9 @@ libxml2.")
(("\"dbus-daemon\"") (("\"dbus-daemon\"")
"g_getenv (\"GDM_DBUS_DAEMON\")") "g_getenv (\"GDM_DBUS_DAEMON\")")
(("X_SERVER") (("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. ;; Use an absolute path for GNOME Session.
(substitute* "daemon/gdm-launch-environment.c" (substitute* "daemon/gdm-launch-environment.c"
(("\"gnome-session\"") (("\"gnome-session\"")

View File

@ -646,7 +646,9 @@ makes the good ol' XlockMore usable."
(gnome-shell-assets gdm-configuration-gnome-shell-assets (gnome-shell-assets gdm-configuration-gnome-shell-assets
(default (list adwaita-icon-theme font-cantarell))) (default (list adwaita-icon-theme font-cantarell)))
(x-server gdm-configuration-x-server (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) (define (gdm-configuration-file config)
(mixed-text-file "gdm-custom.conf" (mixed-text-file "gdm-custom.conf"
@ -717,6 +719,9 @@ makes the good ol' XlockMore usable."
(string-append (string-append
"GDM_X_SERVER=" "GDM_X_SERVER="
#$(gdm-configuration-x-server config)) #$(gdm-configuration-x-server config))
(string-append
"GDM_X_SESSION="
#$(gdm-configuration-x-session config))
(string-append (string-append
"XDG_DATA_DIRS=" "XDG_DATA_DIRS="
((lambda (ls) (string-join ls ":")) ((lambda (ls) (string-join ls ":"))