From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eHtUMPNnP2GCWQAAgWs5BA (envelope-from ) for ; Mon, 13 Sep 2021 17:02:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eDP7K/NnP2F6awAA1q6Kng (envelope-from ) for ; Mon, 13 Sep 2021 15:02:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 347551BE9E for ; Mon, 13 Sep 2021 17:02:11 +0200 (CEST) Received: from localhost ([::1]:42880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPnTG-0006r1-6x for larch@yhetil.org; Mon, 13 Sep 2021 11:02:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPnT8-0006kX-3k for guix-patches@gnu.org; Mon, 13 Sep 2021 11:02:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPnT7-0008EA-RZ for guix-patches@gnu.org; Mon, 13 Sep 2021 11:02:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPnT7-00011C-Ot for guix-patches@gnu.org; Mon, 13 Sep 2021 11:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50563] [PATCH 1/2] gnu: Add Wayland support for GDM References: In-Reply-To: Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Sep 2021 15:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50563 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "50563@debbugs.gnu.org" <50563@debbugs.gnu.org> Received: via spool by 50563-submit@debbugs.gnu.org id=B50563.16315452693838 (code B ref 50563); Mon, 13 Sep 2021 15:02:01 +0000 Received: (at 50563) by debbugs.gnu.org; 13 Sep 2021 15:01:09 +0000 Received: from localhost ([127.0.0.1]:46583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPnSD-0000zl-2l for submit@debbugs.gnu.org; Mon, 13 Sep 2021 11:01:09 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:24985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPh5u-0003Nn-PF for 50563@debbugs.gnu.org; Mon, 13 Sep 2021 04:13:41 -0400 Date: Mon, 13 Sep 2021 08:13:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=protonmail2; t=1631520811; bh=r4sM2LGBtWcaxmOJJuYGkaAnOrkqMgqSfSQdkvnC9zg=; h=Date:To:From:Reply-To:Subject:From; b=VtLf3JvFN3vLpZaQ8O9Ml+l+SzC/UjNS+mTMVsgdddfDA0pUA8SMcBUm8dMwyqkZ9 ypuyLJ9BR7FDQxq3JRorue6+hq5UKTs3de1cTSmB+DjaivihH4NHeDCdKbuxbojFyU F+/eun1hNk5kej92ORGzsD7m6D2EQpNLj9Yb1cBemc74I6t7CGWSbGrEpiORuWPOaw 7R1zNGmBspCKkTkUFHjyceYIdQE3NYxXkSURHZsladQeAIYQiY5UHrNqg86LFQIh/N D8IX7NcUKIeqmq3Ld41ZMKZDNcVxyjJJZa1ZyBNfadvewrQDir6Q5B6CDw8zFU+BfG hgpdrmGrjBN5g== From: Josselin Poiret Message-ID: <9gqXo6rQHM8BM_pHSQdjp5Rn0mQaztAGmA-Nf-_o79iMvKAkYbjRJi4lBj1VsUi3VCeWC6oRpQLPNsN6id9BcsVGtjgqzzHATCJNneF16JE=@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Mon, 13 Sep 2021 11:01:02 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Josselin Poiret Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631545331; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=r4sM2LGBtWcaxmOJJuYGkaAnOrkqMgqSfSQdkvnC9zg=; b=B0xQiyX+U4CpH+qyzQfnLEDI0lB6aO+hicUCfTG8y4jD7LVYPn4qomZExrFOxVIjRBZeI+ abGM/Qib0R3ajM/8YFLJuvEc7+c588n5EydTJzm85uQKg4c6sx41gIv1PNIK7UjepepG4D lMLonRCTjFsho6raQin+a1Px0xTjZ7T+6lx0u1DG1I0+vn48iy3/g9i6AbYpdeGVJvotq5 gsimcI8vFtjAg4D7IL+CKqDm+uSO6cuY9XYQtuRZlBG4dhXP+O+OVCSGbAUicr2VLRV8J+ VMoGAnQvpXSTMM3LSbl3MTFaA8BCSgjNZrMj6/GLND9FuTCzLvNzUMlDtMEE1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631545331; a=rsa-sha256; cv=none; b=GVfOVoPSTwUDf1a8y126Uut1DGTOcuiK0Y3Il6mWjPfp1sromHPBXLPKDAcv4+RsnOKHft qO5HPF+5rpe3/U3i1lNupt/a/8EyrT9kS7ePC37ZRWkITan8L9HQhPaYTRGHfbEaEybMI8 zoGZm/hn2IfQrkVl600YvVmwLhsotBUsjLbgSoFTzd3irJgwTzozlTfBz4GhdXt+SJIHn7 6gMzzEPC1U2hKLs2HaI8h0fkXwD3TSWiXkZwtfV9b1ZEAWvEDqOe8VP/NZmsk2G8uX6J6B vC9Cj7jSzItxXmgvuwDJcUHhOAqkAmE14PhvREuJ3YPFgcs0AUFlSw0gjLZ2Dg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=protonmail2 header.b=VtLf3JvF; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=protonmail2 header.b=VtLf3JvF; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 347551BE9E X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: NgcLjO3Z3Oo4 * Add the optional flag `wayland?` in `gdm-configuration` to launch GDM wit= h 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 a= nd handles graphical user logins. Its value must be a @code{gdm-configuratio= n} (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 i= n -@file{/run/current-system/profile/share/xsessions} and allows users to cho= ose -a session from the log-in screen. Packages such as @code{gnome}, @code{xf= ce}, -and @code{i3} provide @file{.desktop} files; adding them to the system-wid= e -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} prov= ide +@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=3Dwayland 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=3Dwayland 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 =3D FALSE; + if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &way= land_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 ;; . "InitialSetupEnable=3Dfalse\n" - ;; Enable me once X is working. - "WaylandEnable=3Dfalse\n" + "WaylandEnable=3D" (if (gdm-configuration-wayland? conf= ig) + "true" + "false") "\n" "\n" "[debug]\n" "Enable=3D" (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 corr= esponding + ;; line in /etc/profile + "XCURSOR_PATH=3D/run/current-system/profile/sha= re/icons")))) (stop #~(make-kill-destructor)) (respawn? #t)))) -- 2.33.0