From 5c3f0c3e03757b6653f4c2386a526a2d9d6532f7 Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Mon, 13 Sep 2021 07:45:06 +0000 Subject: gnu: Add Wayland support for GDM. Add the optional flag `wayland?` in `gdm-configuration` to launch GDM with Wayland, enabling the use of Wayland sessions with GDM. * gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (gdm): Use it. * gnu/services/xorg.scm ()[wayland?]: New field. (gdm-configuration): Honor it. (gdm-shepherd-service): Add the XCURSOR_PATH environment variable. * doc/guix.texi (X Window): Document it Signed-off-by: Mathieu Othacehe --- gnu/services/xorg.scm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'gnu/services/xorg.scm') diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index d5c5316d3f..30b261453b 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2020 Alex Griffin ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2021 Oleg Pykhalov +;;; Copyright © 2021 Josselin Poiret ;;; ;;; This file is part of GNU Guix. ;;; @@ -883,7 +884,8 @@ the GNOME desktop environment.") (xorg-configuration gdm-configuration-xorg (default (xorg-configuration))) (x-session gdm-configuration-x-session - (default (xinitrc)))) + (default (xinitrc))) + (wayland? gdm-configuration-wayland? (default #f))) (define (gdm-configuration-file config) (mixed-text-file "gdm-custom.conf" @@ -909,8 +911,9 @@ the GNOME desktop environment.") ;; See also ;; . "InitialSetupEnable=false\n" - ;; Enable me once X is working. - "WaylandEnable=false\n" + "WaylandEnable=" (if (gdm-configuration-wayland? config) + "true" + "false") "\n" "\n" "[debug]\n" "Enable=" (if (gdm-configuration-debug? config) @@ -976,7 +979,11 @@ the GNOME desktop environment.") ;; can depend on GNOME Shell directly. (cons #$gnome-shell '#$(gdm-configuration-gnome-shell-assets - config))))))))) + config))))) + ;; 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")))) (stop #~(make-kill-destructor)) (respawn? #t)))) -- cgit v1.2.3