From: Fix gnome-session registration placement Subject: [PATCH] main: Notify gnome-session when we're ready gnome-session's builtin service manager needs gnome-shell to call RegisterClient so it knows shell startup is complete. Without XSMP, this D-Bus call is the only way to signal readiness. Place the notification right after sd_notify() and notify_ready(), during initialization - not in the shutdown handler. --- js/ui/main.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) --- a/js/ui/main.js 2026-03-15 11:01:20.000000000 +0000 +++ b/js/ui/main.js 2026-03-19 15:05:27.806379161 +0000 @@ -314,6 +314,7 @@ GLib.idle_add_once(GLib.PRIORITY_DEFAULT, () => { Shell.util_sd_notify(); global.context.notify_ready(); + _notifyGnomeSessionReady(); }); _startDate = new Date(); @@ -379,6 +380,23 @@ }); } +async function _notifyGnomeSessionReady() { + try { + let startupId = GLib.getenv('DESKTOP_AUTOSTART_ID'); + if (!startupId) + startupId = ''; + let params = GLib.Variant.new('(ss)', ['org.gnome.Shell.desktop', startupId]); + await Gio.DBus.session.call( + 'org.gnome.SessionManager', + '/org/gnome/SessionManager', + 'org.gnome.SessionManager', + 'RegisterClient', params, null, + Gio.DBusCallFlags.NONE, -1, null); + } catch (e) { + log(`Error notifying gnome-session that we're ready: ${e.message}`); + } +} + function _handleShowWelcomeScreen() { const lastShownVersion = global.settings.get_string(WELCOME_DIALOG_LAST_SHOWN_VERSION); if (Util.GNOMEversionCompare(WELCOME_DIALOG_LAST_TOUR_CHANGE, lastShownVersion) > 0) {