mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
services: gdm: Add Wayland support.
* gnu/packages/patches/gdm-wayland-session-wrapper-from-env.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (gdm): Use it. * gnu/services/xorg.scm (<gdm-configuration>)[wayland-session]: New field. (gdm-wayland-session-wrapper): New procedure. (gdm-configuration-file): Point to this new procedure. * doc/guix.texi (X Window): Update it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
committed by
Mathieu Othacehe
parent
5c3f0c3e03
commit
db4681a4c1
+25
-2
@@ -870,6 +870,24 @@ the GNOME desktop environment.")
|
||||
(apply execl (string-append #$dbus "/bin/dbus-daemon")
|
||||
(program-arguments)))))
|
||||
|
||||
;; Wrapper script for Wayland sessions, similar to Xsession.
|
||||
;;
|
||||
;; See `xinitrc`. By default, it launches the specified session through a
|
||||
;; login shell. With the default Guix configuration, this should source
|
||||
;; /etc/profile, setting up the Guix profile environment variables. However,
|
||||
;; gdm launches its own graphical session through the same method, so we need
|
||||
;; to ignore this case, since `gdm` doesn't have a login shell.
|
||||
(define gdm-wayland-session-wrapper
|
||||
(program-file
|
||||
"gdm-wayland-session-wrapper"
|
||||
#~((let* ((user (getpw (getuid)))
|
||||
(name (passwd:name user))
|
||||
(shell (passwd:shell user))
|
||||
(args (cdr (command-line))))
|
||||
(if (string=? name "gdm")
|
||||
(apply execl (cons (car args) args))
|
||||
(execl shell shell "--login" "-c" (string-join args)))))))
|
||||
|
||||
(define-record-type* <gdm-configuration>
|
||||
gdm-configuration make-gdm-configuration
|
||||
gdm-configuration?
|
||||
@@ -885,7 +903,9 @@ the GNOME desktop environment.")
|
||||
(default (xorg-configuration)))
|
||||
(x-session gdm-configuration-x-session
|
||||
(default (xinitrc)))
|
||||
(wayland? gdm-configuration-wayland? (default #f)))
|
||||
(wayland? gdm-configuration-wayland? (default #f))
|
||||
(wayland-session gdm-configuration-wayland-session
|
||||
(default gdm-wayland-session-wrapper)))
|
||||
|
||||
(define (gdm-configuration-file config)
|
||||
(mixed-text-file "gdm-custom.conf"
|
||||
@@ -983,7 +1003,10 @@ the GNOME desktop environment.")
|
||||
;; Add XCURSOR_PATH so that mutter can find its
|
||||
;; cursors. gdm doesn't login so doesn't source
|
||||
;; the corresponding line in /etc/profile.
|
||||
"XCURSOR_PATH=/run/current-system/profile/share/icons"))))
|
||||
"XCURSOR_PATH=/run/current-system/profile/share/icons"
|
||||
(string-append
|
||||
"GDM_WAYLAND_SESSION="
|
||||
#$(gdm-configuration-wayland-session config))))))
|
||||
(stop #~(make-kill-destructor))
|
||||
(respawn? #t))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user