Currently we have a whole daisy-chain of startplasmawayland-> kwin -> startplasmawaylandsession -> launching the session. This was needed as we needed environment variables which previously we only knew after kwin started. After some kwin refactoring this is no longer the case, and kwin_wayland_wrapper will sync it's environment variables to the appropriate startup environments. This allows us to move starting kwin_wayland to be systemd managed, brining resource control, alongside it's classic counterpart plasma-session.wilder-5.24
parent
3a1603a4e1
commit
7884f53d3c
7 changed files with 36 additions and 67 deletions
@ -1,42 +0,0 @@ |
||||
/*
|
||||
SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org> |
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later |
||||
*/ |
||||
|
||||
#include "startplasma.h" |
||||
#include <signal.h> |
||||
|
||||
int main(int argc, char **argv) |
||||
{ |
||||
QCoreApplication app(argc, argv); |
||||
signal(SIGTERM, sigtermHandler); |
||||
|
||||
QScopedPointer<QProcess, KillBeforeDeleter> ksplash; |
||||
|
||||
if (!qEnvironmentVariableIsSet("KWIN_RESTART_COUNT")) { |
||||
ksplash.reset(setupKSplash()); |
||||
} |
||||
|
||||
out << "startplasma-waylandsession: Starting up...\n"; |
||||
|
||||
if (!syncDBusEnvironment()) { |
||||
out << "Could not sync environment to dbus.\n"; |
||||
return 2; |
||||
} |
||||
|
||||
if (!startPlasmaSession(true)) |
||||
return 4; |
||||
|
||||
// Anything after here is logout
|
||||
// It is not called after shutdown/restart
|
||||
waitForKonqi(); |
||||
out << "startplasma-waylandsession: Shutting down...\n"; |
||||
|
||||
// Keep for KF5; remove in KF6 (KInit will be gone then)
|
||||
runSync(QStringLiteral("kdeinit5_shutdown"), {}); |
||||
|
||||
out << "startplasma-waylandsession: Done.\n"; |
||||
|
||||
return 0; |
||||
} |
||||
Loading…
Reference in new issue