mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-18 12:13:42 +02:00
I and Fossdd had some cases where Phosh wouldn't start up and just error out because the phosh-session script somehow incorrectly would end up in the "ERR: gnome-session only supports systemd" case. As we enable the systemd session support in gnome-session now, we no longer need this detection code and can just rely on gnome-session's automatic fallback to the builtin session mode and avoid the risk of this error occurring. From https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1391
133 lines
4.5 KiB
Diff
133 lines
4.5 KiB
Diff
From fa1ba129b07bb5306e0fd43772f7ff5c9a3dd91d Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
Date: Sat, 30 Mar 2024 20:42:27 +0100
|
|
Subject: [PATCH] treewide: Drop support for --builtin session fallback
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Always use systemd as gnome 46's gnome-session doesn't support anything
|
|
else.
|
|
|
|
Thanks dhjg2000 for figuring this out
|
|
|
|
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
---
|
|
data/meson.build | 11 -----------
|
|
data/phosh-session.in | 12 +-----------
|
|
data/sm.puri.Phosh.desktop.in.in | 2 +-
|
|
data/systemd/meson.build | 3 ---
|
|
meson.build | 1 -
|
|
meson_options.txt | 4 ----
|
|
7 files changed, 3 insertions(+), 32 deletions(-)
|
|
|
|
diff --git a/data/meson.build b/data/meson.build
|
|
index d76391f4f..5bcf7d31b 100644
|
|
--- a/data/meson.build
|
|
+++ b/data/meson.build
|
|
@@ -26,11 +26,6 @@ desktopconf = configuration_data()
|
|
desktopconf.set('bindir', bindir)
|
|
desktopconf.set('libexecdir', libexecdir)
|
|
desktopconf.set('required_components', ';'.join(desktop_required_components) + ';')
|
|
-if get_option('systemd')
|
|
- desktopconf.set('hidden_under_systemd', 'X-GNOME-HiddenUnderSystemd=true')
|
|
-else
|
|
- desktopconf.set('hidden_under_systemd', '')
|
|
-endif
|
|
|
|
desktop_utils = find_program('desktop-file-validate', required: false)
|
|
desktop_files = {
|
|
@@ -85,12 +80,6 @@ runconf.set('version', meson.project_version())
|
|
runconf.set('wlrootsdir', join_paths(libexecdir, 'wlroots'))
|
|
runconf.set('compositor', get_option('compositor'))
|
|
|
|
-if get_option('systemd')
|
|
- runconf.set('session_manager', '--systemd')
|
|
-else
|
|
- runconf.set('session_manager', '--builtin')
|
|
-endif
|
|
-
|
|
configure_file(
|
|
input: 'phosh-session.in',
|
|
output: 'phosh-session',
|
|
diff --git a/data/phosh-session.in b/data/phosh-session.in
|
|
index f0a532f10..f346c02ad 100755
|
|
--- a/data/phosh-session.in
|
|
+++ b/data/phosh-session.in
|
|
@@ -46,18 +46,8 @@ 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'"
|
|
diff --git a/data/sm.puri.Phosh.desktop.in.in b/data/sm.puri.Phosh.desktop.in.in
|
|
index d777bcccd..51d8a7841 100644
|
|
--- a/data/sm.puri.Phosh.desktop.in.in
|
|
+++ b/data/sm.puri.Phosh.desktop.in.in
|
|
@@ -11,5 +11,5 @@ X-GNOME-Autostart-Phase=DisplayServer
|
|
X-GNOME-Provides=panel;windowmanager;
|
|
X-GNOME-Autostart-Notify=true
|
|
X-GNOME-AutoRestart=true
|
|
+X-GNOME-HiddenUnderSystemd=true
|
|
X-Phosh-UsesFeedback=true
|
|
-@hidden_under_systemd@
|
|
diff --git a/data/systemd/meson.build b/data/systemd/meson.build
|
|
index 5a11df87e..bc3c47388 100644
|
|
--- a/data/systemd/meson.build
|
|
+++ b/data/systemd/meson.build
|
|
@@ -1,5 +1,3 @@
|
|
-if get_option('systemd')
|
|
-
|
|
gsd_wants = ''
|
|
foreach component : gsd_required_components
|
|
gsd_wants += 'Wants=' + component + '.target\n'
|
|
@@ -34,4 +32,3 @@ configure_file(
|
|
|
|
install_data('sm.puri.Phosh.target', install_dir: systemduserdir)
|
|
|
|
-endif
|
|
diff --git a/meson.build b/meson.build
|
|
index befb7c8c1..75f454360 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -267,7 +267,6 @@ summary({
|
|
|
|
summary({
|
|
'Compositor:': get_option('compositor'),
|
|
- 'Systemd for session': get_option('systemd'),
|
|
},
|
|
bool_yn: true,
|
|
section: 'Runtime',
|
|
diff --git a/meson_options.txt b/meson_options.txt
|
|
index 8c2fbc921..8c267a777 100644
|
|
--- a/meson_options.txt
|
|
+++ b/meson_options.txt
|
|
@@ -14,10 +14,6 @@ option('man',
|
|
type: 'boolean', value : false,
|
|
description : 'generate man pages (requires rst2man)')
|
|
|
|
-option('systemd',
|
|
- type: 'boolean', value: true,
|
|
- description: 'Whether to generate systemd user units')
|
|
-
|
|
option('compositor',
|
|
type: 'string', value: '/usr/bin/phoc',
|
|
description: 'Path to the Phoc compositor for use in the launcher script')
|
|
--
|
|
GitLab
|
|
|