From 31257d69c511f80673dbc2fe0b232dc16d08d26a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sun, 23 Aug 2020 16:00:46 +0200 Subject: [PATCH] Backport a fix for launching apps under X11 https://bugzilla.redhat.com/show_bug.cgi?id=1870234 --- fix-x11-login.patch | 59 +++++++++++++++++++++++++++++++++++++++++++++ gnome-shell.spec | 8 +++++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 fix-x11-login.patch diff --git a/fix-x11-login.patch b/fix-x11-login.patch new file mode 100644 index 0000000..fd483a6 --- /dev/null +++ b/fix-x11-login.patch @@ -0,0 +1,59 @@ +From 56b6e653175bbf85261712dda96cb99bcd727482 Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Thu, 20 Aug 2020 10:08:01 +0200 +Subject: [PATCH 1/2] data: Only unset environment when the service actually + ran + +ExecStopPost= is executed even if ExecCondition= fails. As such, we need +to add a guard as we would otherwise clear environment variables on X11 +sessions (rendering them utterly useless). + +https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418 +--- + data/org.gnome.Shell@wayland.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/org.gnome.Shell@wayland.service.in b/data/org.gnome.Shell@wayland.service.in +index 427e3c8072..692d45bb37 100644 +--- a/data/org.gnome.Shell@wayland.service.in ++++ b/data/org.gnome.Shell@wayland.service.in +@@ -26,7 +26,7 @@ ExecStart=@bindir@/gnome-shell + SuccessExitStatus=1 + + # unset some environment variables that were set by the shell and won't work now that the shell is gone +-ExecStopPost=-systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY ++ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY' + + # On wayland we cannot restart + Restart=no +-- +GitLab + + +From 6ad9c99040cec703cec85c68d1d168d3845ceaaa Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Thu, 20 Aug 2020 10:09:00 +0200 +Subject: [PATCH 2/2] data: Fix description of org.gnome.Shell.target + +The target is generic between X11 and wayland now, so remove the +reference to wayland. + +https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418 +--- + data/org.gnome.Shell.target | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/org.gnome.Shell.target b/data/org.gnome.Shell.target +index 358189f26f..55f9539e98 100644 +--- a/data/org.gnome.Shell.target ++++ b/data/org.gnome.Shell.target +@@ -1,5 +1,5 @@ + [Unit] +-Description=GNOME Shell on Wayland ++Description=GNOME Shell + DefaultDependencies=no + + Requisite=gnome-session-initialized.target +-- +GitLab + diff --git a/gnome-shell.spec b/gnome-shell.spec index a3a7b27..4c9649f 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -1,6 +1,6 @@ Name: gnome-shell Version: 3.37.90 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Window management and application launching for GNOME License: GPLv2+ @@ -15,6 +15,9 @@ Patch1: gnome-shell-favourite-apps-firefox.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1830343 Patch2: fix-old-style-vpn.patch +# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418 +Patch3: fix-x11-login.patch + %define eds_version 3.33.1 %define gnome_desktop_version 3.35.91 %define glib2_version 2.56.0 @@ -210,6 +213,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/gnome-shell.1* %changelog +* Sun Aug 23 2020 Kalev Lember - 3.37.90-2 +- Backport a fix for launching apps under X11 (#1870234) + * Fri Aug 14 2020 Florian Müllner - 3.37.90-1 - Update to 3.37.90