From f1eb467a0c4ef89bbf74576dc3dd6bfa3f8ae1c4003a7260410fc82c62c48f93 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 8 Jun 2022 07:26:43 +0000 Subject: [PATCH] Accepting request 981166 from home:Vogtinator:plasma5.25 - Add patch to fix opensuse-welcome autostart disabling: * 0001-startkde-Reload-systemd-on-Plasma-start.patch OBS-URL: https://build.opensuse.org/request/show/981166 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=644 --- ...rtkde-Reload-systemd-on-Plasma-start.patch | 48 +++++++++++++++++++ plasma5-workspace.changes | 6 +++ plasma5-workspace.spec | 2 + 3 files changed, 56 insertions(+) create mode 100644 0001-startkde-Reload-systemd-on-Plasma-start.patch diff --git a/0001-startkde-Reload-systemd-on-Plasma-start.patch b/0001-startkde-Reload-systemd-on-Plasma-start.patch new file mode 100644 index 0000000..4ead588 --- /dev/null +++ b/0001-startkde-Reload-systemd-on-Plasma-start.patch @@ -0,0 +1,48 @@ +From 3b38de153c2ff78b97174d5d7b4258a74173e5c3 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 7 Jun 2022 14:12:03 +0200 +Subject: [PATCH] startkde: Reload systemd on Plasma start + +If the time between logout and relogin is short enough or a separate session +is open during that time, the systemd user instance keeps running. This means +that generators like the one for XDG autostart handling aren't run again, which +effectively means it's still using the configuration from the previous session. + +Just reload systemd on every login to make sure its state is fresh. +--- + startkde/startplasma.cpp | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp +index dc928a62d..9f026e033 100644 +--- a/startkde/startplasma.cpp ++++ b/startkde/startplasma.cpp +@@ -504,6 +504,17 @@ void resetSystemdFailedUnits() + QDBusConnection::sessionBus().call(message); + } + ++// Reload systemd to make sure the current configuration is active, which also reruns generators. ++// Needed for e.g. XDG autostart changes to become effective. ++void reloadSystemd() ++{ ++ QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.systemd1"), ++ QStringLiteral("/org/freedesktop/systemd1"), ++ QStringLiteral("org.freedesktop.systemd1.Manager"), ++ QStringLiteral("Reload")); ++ QDBusConnection::sessionBus().call(message); ++} ++ + bool hasSystemdService(const QString &serviceName) + { + qDBusRegisterMetaType>(); +@@ -611,6 +622,7 @@ static void migrateUserScriptsAutostart() + bool startPlasmaSession(bool wayland) + { + resetSystemdFailedUnits(); ++ reloadSystemd(); + OrgKdeKSplashInterface iface(QStringLiteral("org.kde.KSplash"), QStringLiteral("/KSplash"), QDBusConnection::sessionBus()); + iface.setStage(QStringLiteral("startPlasma")); + // finally, give the session control to the session manager +-- +2.36.1 + diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 388571c..0a2b519 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 7 12:55:36 UTC 2022 - Fabian Vogt + +- Add patch to fix opensuse-welcome autostart disabling: + * 0001-startkde-Reload-systemd-on-Plasma-start.patch + ------------------------------------------------------------------- Thu May 19 19:46:06 UTC 2022 - Fabian Vogt diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 977bc93..16491f0 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -41,6 +41,8 @@ Source1: https://download.kde.org/unstable/plasma/%{version}/plasma-works Source2: plasma.keyring %endif Source3: xprop-kde-full-session.desktop +# PATCH-FIX-UPSTREAM +Patch1: 0001-startkde-Reload-systemd-on-Plasma-start.patch # PATCHES 501-??? are PATCH-FIX-OPENSUSE Patch501: 0001-Use-qdbus-qt5.patch Patch502: 0001-Ignore-default-sddm-face-icons.patch