Commit d24cef54 authored by David Edmundson's avatar David Edmundson
Browse files

[ksmserver] Use UpdateLaunchEnvJob to sync SESSION_MANAGER env

ksmserver starts in plasma-session. It currently sets the
SESSION_MANAGER env back to just kinit and plasma-session which is then
used for anything else that plasma-session starts.

This is after start-plasma has synced the environment to DBus/systemd.

By using the shared UpdateLaunchEnvJob we can sync all these places.

BUG: 425982
parent 57cfab21
......@@ -97,6 +97,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "kscreenlocker_interface.h"
#include "kwinsession_interface.h"
#include <updatelaunchenvjob.h>
KSMServer* the_server = nullptr;
KSMServer* KSMServer::self()
......@@ -661,12 +663,8 @@ KSMServer::KSMServer(InitFlags flags)
fclose(f);
setenv( "SESSION_MANAGER", session_manager, true );
// Pass env. var to kdeinit.
org::kde::KLauncher klauncher( QStringLiteral( "org.kde.klauncher5" ), QStringLiteral( "/KLauncher" ), QDBusConnection::sessionBus());
klauncher.setLaunchEnv( QStringLiteral( "SESSION_MANAGER" ), QString::fromLocal8Bit( (const char*) session_manager ) );
org::kde::Startup startup(QStringLiteral("org.kde.Startup"), QStringLiteral("/Startup"), QDBusConnection::sessionBus());
startup.updateLaunchEnv( QStringLiteral( "SESSION_MANAGER" ), QString::fromLocal8Bit( (const char*) session_manager ) );
auto updateEnvJob = new UpdateLaunchEnvJob(QStringLiteral("SESSION_MANAGER"), QString::fromLatin1(session_manager));
updateEnvJob->start();
free(session_manager);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment