Subject: [bug#50563] [PATCH 2/2] gnu: gdm: Add Wayland session wrapper script.

From: Maxime Devos <[email-masked]>
Date: Mon, 13 Sep 2021 20:14:45 +0200

Josselin Poiret schreef op ma 13-09-2021 om 08:15 [+0000]:
> * Patch GDM to support launching a wrapper script for Wayland sessions.
> * Add `wayland-session` in `gdm-configuration` to specify the wrapper to use.
> * Add default wrapper that runs non-GDM sessions through a login shell (based
> on the `xinitrc`).
> * Update the documentation with those changes.
> ---
>  doc/guix.texi                                 |  4 +++
>  gnu/packages/gnome.scm                        |  3 +-
>  ...gdm-wayland-session-wrapper-from-env.patch | 35 +++++++++++++++++++
>  gnu/services/xorg.scm                         | 21 +++++++++--
>  4 files changed, 60 insertions(+), 3 deletions(-)
>  create mode 100644 gnu/packages/patches/gdm-wayland-session-wrapper-from-env.patch
> 
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 93ea4a321f..3e6157c8ab 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -18098,6 +18098,10 @@ The GDM package to use.
> 
>  @item @code{wayland?} (default: @code{#f})
>  When true, enables Wayland in GDM, necessary to use Wayland sessions.
> +
> +@item @code{wayland-session} (default: @code{gdm-wayland-session-wrapper})
> +The Wayland session wrapper to use, needed to setup the
> +environment.

‘needed to setup the environment’ --> this sounds like sometimes, the session
wrapper needs to be changed such that the environment variables are correct.
However, gdm-wayland-session-wrapper doesn't actually set any environment variables,
and the X equivalent 'xsession' doesn't need to be modified (at least on my system,
when I last used gdm), so I presume the default is quite reasonable for most users.

So to reduce confusion, I would drop the ‘needed to set up the environment’.

A ‘real-world’ example of a custom 'wayland-session' would be helpful to illustrate
matters.

Greetings,
Maxime