guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 35cc9d179f47645b8b40468d204dd742ba8a4f0c
Author: Noé Lopez <[email protected]>
AuthorDate: Thu Oct 1 20:46:53 2026 +0200

    gnu: gnome-shell: Replace systemd-notify with gherd.
    
    This is needed to wait for mutter to have set its environment variables 
before
    having gnome-session-shepherd start the other services.
    
    * gnu/packages/gnome.scm (gnome-shell): Add patch.
    * gnu/packages/patches/gnome-shell-notify-gnome-session.patch: New file.
    
    Signed-off-by: Liliana Marie Prikler <[email protected]>
    Merges: guix/guix#12313
---
 gnu/packages/gnome.scm                             |  3 +-
 .../patches/gnome-shell-notify-gnome-session.patch | 55 ++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 24e945e328c..610810cdda9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9457,7 +9457,8 @@ properties, screen resolution, and other GNOME 
parameters.")
                (base32
                 "0s00zxg4z3p02px6nxnhb0q6kn5lyhxbg86z2phrac7ibky541b4"))
               (patches
-               (search-patches "gnome-shell-restore-desktop-file.patch"))))
+               (search-patches "gnome-shell-restore-desktop-file.patch"
+                               "gnome-shell-notify-gnome-session.patch"))))
     (outputs '("out" "debug"))
     (build-system meson-build-system)
     (arguments
diff --git a/gnu/packages/patches/gnome-shell-notify-gnome-session.patch 
b/gnu/packages/patches/gnome-shell-notify-gnome-session.patch
new file mode 100644
index 00000000000..5b81dc31ad1
--- /dev/null
+++ b/gnu/packages/patches/gnome-shell-notify-gnome-session.patch
@@ -0,0 +1,55 @@
+From ef31d1b2c8c76bff08bc0b35c8d65ed12324d5c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?No=C3=A9=20Lopez?= <[email protected]>
+Date: Fri, 13 Nov 2026 11:08:58 +0100
+Subject: [PATCH] Notify gnome-session when startup is done.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is needed to wait for mutter to have set its environment variables before
+having gnome-session-shepherd start the other services.
+
+We simply replace systemd-notify with gherd’s notification mechanism.
+
+See also (gnome-session-shepherd)Notifications.
+
+Upstream-Status: Not applicable.
+---
+ src/shell-util.c | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/src/shell-util.c b/src/shell-util.c
+index a965c7148..7f547ee55 100644
+--- a/src/shell-util.c
++++ b/src/shell-util.c
+@@ -772,9 +772,24 @@ shell_util_systemd_unit_exists_finish (GAsyncResult  *res,
+ void
+ shell_util_sd_notify (void)
+ {
+-  /* We only use NOTIFY_SOCKET exactly once; unset it so it doesn't remain in
+-   * our environment. */
+-  sd_notify (1, "READY=1");
++  GError *error = NULL;
++  gint status = -1;
++  const gchar *argv[] = {"gherd", "notify", "gnome-session-meta", 
"org.gnome.Shell", NULL};
++
++  g_spawn_sync (NULL, (gchar **) argv, NULL,
++                (G_SPAWN_DEFAULT | G_SPAWN_SEARCH_PATH |
++                 G_SPAWN_STDOUT_TO_DEV_NULL |
++                 G_SPAWN_STDERR_TO_DEV_NULL),
++                NULL, NULL, NULL, NULL, &status, &error);
++  if (error != NULL)
++    {
++      g_warning ("Failed to notify gnome-session: %s", error->message);
++      g_error_free (error);
++    }
++  else if (status != 0)
++    {
++      g_warning ("Failed to notify gnome-session: gherd returned status %d", 
status);
++    }
+ }
+ 
+ /**
+-- 
+2.55.0
+

Reply via email to