From: Josselin Poiret <dev@jpoiret.xyz>
To: "50563@debbugs.gnu.org" <50563@debbugs.gnu.org>
Subject: [bug#50563] [PATCH 1/2] gnu: Add Wayland support for GDM
Date: Mon, 13 Sep 2021 08:13:27 +0000 [thread overview]
Message-ID: <9gqXo6rQHM8BM_pHSQdjp5Rn0mQaztAGmA-Nf-_o79iMvKAkYbjRJi4lBj1VsUi3VCeWC6oRpQLPNsN6id9BcsVGtjgqzzHATCJNneF16JE=@jpoiret.xyz> (raw)
In-Reply-To: <KMN7RYYPktrwK2z_REQjG3bPRO8HX3qFBs6gAOCnqILPNK0S-Eepvof4K1nkZEa8BOS3zf2U_FaukNJeZfpxs2bec9lK7ZOxQMENe2pyVEU=@jpoiret.xyz>
* Add the optional flag `wayland?` in `gdm-configuration` to launch GDM with
Wayland, enabling the use of Wayland sessions with GDM.
* Remove hardcoded Xwayland check in GDM.
* Add `XCURSOR_PATH` to GDM environment.
* Update the documentation.
---
doc/guix.texi | 33 ++++++++++++-------
gnu/packages/gnome.scm | 3 +-
.../gdm-remove-hardcoded-xwayland-path.patch | 22 +++++++++++++
gnu/services/xorg.scm | 14 +++++---
4 files changed, 56 insertions(+), 16 deletions(-)
create mode 100644 gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch
diff --git a/doc/guix.texi b/doc/guix.texi
index 220499503d..93ea4a321f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18043,19 +18043,26 @@ example the @code{windowmaker} or @code{openbox} packages---preferably
by adding it to the @code{packages} field of your operating system
definition (@pxref{operating-system Reference, system-wide packages}).
+@anchor{wayland-gdm}
+GDM also supports Wayland: it can itself use Wayland instead of X11 for
+its user interface, and it can also start Wayland sessions. The former is
+required for the latter, to enable, set @code{wayland?} to @code{#t} in
+@code{gdm-configuration}.
+
@defvr {Scheme Variable} gdm-service-type
This is the type for the @uref{https://wiki.gnome.org/Projects/GDM/, GNOME
Desktop Manager} (GDM), a program that manages graphical display servers and
handles graphical user logins. Its value must be a @code{gdm-configuration}
(see below).
-@cindex session types (X11)
-@cindex X11 session types
+@cindex session types
GDM looks for @dfn{session types} described by the @file{.desktop} files in
-@file{/run/current-system/profile/share/xsessions} and allows users to choose
-a session from the log-in screen. Packages such as @code{gnome}, @code{xfce},
-and @code{i3} provide @file{.desktop} files; adding them to the system-wide
-set of packages automatically makes them available at the log-in screen.
+@file{/run/current-system/profile/share/xsessions} (for X11 sessions) and
+@file{/run/current-system/profile/share/wayland-sessions} (for Wayland
+sessions) and allows users to choose a session from the log-in screen.
+Packages such as @code{gnome}, @code{xfce}, @code{i3} and @code{sway} provide
+@file{.desktop} files; adding them to the system-wide set of packages
+automatically makes them available at the log-in screen.
In addition, @file{~/.xsession} files are honored. When available,
@file{~/.xsession} must be an executable that starts a window manager
@@ -18088,6 +18095,9 @@ File name of the @code{dbus-daemon} executable.
@item @code{gdm} (default: @code{gdm})
The GDM package to use.
+
+@item @code{wayland?} (default: @code{#f})
+When true, enables Wayland in GDM, necessary to use Wayland sessions.
@end table
@end deftp
@@ -19310,11 +19320,12 @@ expected.
The desktop environments in Guix use the Xorg display server by
default. If you'd like to use the newer display server protocol
-called Wayland, you need to use the @code{sddm-service} instead of
-GDM as the graphical login manager. You should then
-select the ``GNOME (Wayland)'' session in SDDM@. Alternatively you can
-also try starting GNOME on Wayland manually from a TTY with the
-command ``XDG_SESSION_TYPE=wayland exec dbus-run-session
+called Wayland, you need to enable Wayland support in GDM
+(@pxref{wayland-gdm}). Another solution is to use the
+@code{sddm-service} instead of GDM as the graphical login manager.
+You should then select the ``GNOME (Wayland)'' session in SDDM@.
+Alternatively you can also try starting GNOME on Wayland manually from a
+TTY with the command ``XDG_SESSION_TYPE=wayland exec dbus-run-session
gnome-session``. Currently only GNOME has support for Wayland.
@defvr {Scheme Variable} gnome-desktop-service-type
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 5a8bcdb8ce..2da0b3791f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8111,7 +8111,8 @@ library.")
(sha256
(base32
"1lyqvcwxhwxklbxn4xjswjzr6fhjix6h28mi9ypn34wdm9bzcpg8"))
- (patches (search-patches "gdm-default-session.patch"))))
+ (patches (search-patches "gdm-default-session.patch"
+ "gdm-remove-hardcoded-xwayland-path.patch"))))
(build-system glib-or-gtk-build-system)
(arguments
'(#:configure-flags
diff --git a/gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch b/gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch
new file mode 100644
index 0000000000..321a0e4b87
--- /dev/null
+++ b/gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch
@@ -0,0 +1,22 @@
+Remove check for hardcoded Xwayland path in gdm.
+
+---
+ daemon/gdm-local-display-factory.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
+index da1093bb..37355c06 100644
+--- a/daemon/gdm-local-display-factory.c
++++ b/daemon/gdm-local-display-factory.c
+@@ -203,7 +203,7 @@ gdm_local_display_factory_use_wayland (void)
+ #ifdef ENABLE_WAYLAND_SUPPORT
+ gboolean wayland_enabled = FALSE;
+ if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
+- if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE) )
++ if (wayland_enabled)
+ return TRUE;
+ }
+ #endif
+--
+2.33.0
+
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d5c5316d3f..fe25168a58 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -883,7 +883,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 +910,9 @@ the GNOME desktop environment.")
;; See also
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39281>.
"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 +978,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))))
--
2.33.0
next prev parent reply other threads:[~2021-09-13 15:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 7:35 [bug#50563] [PATCH [0/2] gnu: GDM: Add Wayland support Josselin Poiret
2021-09-13 7:45 ` [bug#50563] [PATCH 1/2] gnu: Add Wayland support for GDM Josselin Poiret via Guix-patches via
2021-09-13 7:49 ` [bug#50563] [PATCH 2/2] gnu: gdm: Add Wayland session wrapper script Josselin Poiret via Guix-patches via
2021-09-13 8:13 ` Josselin Poiret [this message]
2021-09-13 8:15 ` Josselin Poiret
2021-09-13 18:14 ` Maxime Devos
2021-10-01 7:37 ` [bug#50563] [PATCH [0/2] gnu: GDM: Add Wayland support Mathieu Othacehe
2021-10-01 8:56 ` Josselin Poiret
2021-10-01 9:16 ` Mathieu Othacehe
2021-10-02 16:51 ` Josselin Poiret
2021-10-02 17:29 ` bug#50563: " Mathieu Othacehe
2021-09-13 15:43 ` [bug#50563] (No Subject) Josselin Poiret via Guix-patches via
2021-09-14 2:02 ` Jack Hill
2021-09-14 21:45 ` [bug#50563] Re: [bug#50563] [PATCH 2/2] gnu: gdm: Add Wayland session wrapper script Josselin Poiret
2021-09-15 9:47 ` Maxime Devos
2021-09-29 11:20 ` [bug#50563] [PATCH [0/2] gnu: GDM: Add Wayland support Mathieu Othacehe
2021-09-29 12:10 ` Mathieu Othacehe
2021-09-29 22:10 ` Josselin Poiret
2021-09-30 9:41 ` Mathieu Othacehe
2021-09-30 14:27 ` Josselin Poiret
2021-10-01 7:33 ` Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='9gqXo6rQHM8BM_pHSQdjp5Rn0mQaztAGmA-Nf-_o79iMvKAkYbjRJi4lBj1VsUi3VCeWC6oRpQLPNsN6id9BcsVGtjgqzzHATCJNneF16JE=@jpoiret.xyz' \
--to=dev@jpoiret.xyz \
--cc=50563@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.