From 19ba5f1cf34cbe5bfe71d3bf40e7cb8bae3520b7 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 19 Feb 2021 13:11:59 +0000 Subject: [PATCH] Enforce SESSION_MANAGER is exported before plasmashell is started Wants says we should bring ksmserver up, but by default that could be in any order, we need to define it. kcminit also potentially exports environment variables. This was written with the correct order in-mind but the wrong keyword used. We don't need "Wants" as plasma-core.target already defines that we will be loading them along with plasmashell. It is important that ksmserver is up and has completed exporting the SESSION_MANAGER env, otherwise plasmashell will not propogate it so applications it launches introducing an X session regression --- ksmserver/server.cpp | 2 +- shell/plasma-plasmashell.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index 77fd18d83..458828de5 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -582,7 +582,7 @@ KSMServer::KSMServer(InitFlags flags) setenv("SESSION_MANAGER", session_manager, true); auto updateEnvJob = new UpdateLaunchEnvJob(QStringLiteral("SESSION_MANAGER"), QString::fromLatin1(session_manager)); - updateEnvJob->start(); + updateEnvJob->exec(); free(session_manager); } diff --git a/shell/plasma-plasmashell.service.in b/shell/plasma-plasmashell.service.in index f3e7c5e52..c95e89a54 100644 --- a/shell/plasma-plasmashell.service.in +++ b/shell/plasma-plasmashell.service.in @@ -1,6 +1,6 @@ [Unit] Description=KDE Plasma Workspace -Wants=plasma-ksmserver.service plasma-kcminit.service +After=plasma-ksmserver.service plasma-kcminit.service PartOf=graphical-session.target [Service]