From 6c18fb28f9fd535c511c8a6f3b749e31b72a7c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sun, 31 Mar 2024 12:28:04 +0200 Subject: [PATCH 1/2] session: Only append session manager if supported by gnome-session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gnome-session dropped support for --builtin and --systemd. So don't append that argument if it doesn't show up in gnome-session's help output. Signed-off-by: Guido Günther Part-of: --- data/phosh-session.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/data/phosh-session.in b/data/phosh-session.in index 6c295ab80..8bac2fc31 100755 --- a/data/phosh-session.in +++ b/data/phosh-session.in @@ -50,8 +50,18 @@ if [ -f "$HOME/.phoshdebug" ]; then . "$HOME/.phoshdebug" fi +SESSION_MANAGER= +# old gnome-session: Pass --builtin or --systemd +if gnome-session --help | grep -qs '\-\-builtin'; then + SESSION_MANAGER=@session_manager@ +# gnome-session >= 46 doesn't support builtin +elif [ "@session_manager@" = "--builtin" ]; then + echo "ERR: gnome-session only supports systemd, session cannot start" 1>&2 + exit 1 +fi + # Run gnome-session through a login shell so it picks # variables from /etc/profile.d (XDG_*) [ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput export WLR_BACKENDS -exec "${COMPOSITOR}" -S -C "${PHOC_INI}" -E "bash -lc 'exec ${GNOME_SESSION} --disable-acceleration-check --session=phosh @session_manager@'" +exec "${COMPOSITOR}" -S -C "${PHOC_INI}" -E "bash -lc 'exec ${GNOME_SESSION} --disable-acceleration-check --session=phosh ${SESSION_MANAGER}'" -- GitLab From 20fae2363f02ddc19de77b743d7668169dd0548f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sun, 31 Mar 2024 12:29:30 +0200 Subject: [PATCH 2/2] build: Use systemd session manager by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gnome-session dropped support for the builtin manager in 46. Signed-off-by: Guido Günther Part-of: --- meson_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index 2320bd75f..940cf9b1c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -15,7 +15,7 @@ option('man', description : 'generate man pages (requires rst2man)') option('systemd', - type: 'boolean', value: false, + type: 'boolean', value: true, description: 'Whether to generate systemd user units') option('compositor', -- GitLab