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

Move ksmserver's ksplash notifying to ksmserver

Previously the call to ksplash was being emitted by plasma-session. This
isn't used in the systemd startup so it was introduced in a somewhat
messy script.

This script has an issue:

If ksplash is disabled the bus name won't be registered. Typically this
isn't an issue. However to avoid a race condition ksplash registers
itself as being DBus activatable, so that the dbus server holds
dispatching the message.

This combo means ksmserver our unit is considered as not running until
our script times out. This then defers other things in the chain that
depend on ksmserver.

Moving the call into the relevant piece of code into ksmserver unifies
things into a single path and gives us more control.

BUG: 432364


(cherry picked from commit e7e49916)
parent e4cbac85
......@@ -5,8 +5,6 @@ PartOf=graphical-session.target
[Service]
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/ksmserver
# This magic minus sign means don't fail if exit code is non-zero...
ExecStartPost=-@QtBinariesDir@/qdbus org.kde.KSplash /KSplash org.kde.KSplash.setStage ksmserver
BusName=org.kde.ksmserver
Slice=session.slice
......
......@@ -620,6 +620,13 @@ KSMServer::KSMServer(InitFlags flags)
connect(qApp, &QApplication::aboutToQuit, this, &KSMServer::cleanUp);
setupXIOErrorHandler();
QDBusMessage ksplashProgressMessage = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"),
QStringLiteral("/KSplash"),
QStringLiteral("org.kde.KSplash"),
QStringLiteral("setStage"));
ksplashProgressMessage.setArguments({QStringLiteral("ksmserver")});
QDBusConnection::sessionBus().call(ksplashProgressMessage, QDBus::NoBlock);
}
KSMServer::~KSMServer()
......
......@@ -220,7 +220,6 @@ Startup::Startup(QObject *parent)
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Startup"), QStringLiteral("org.kde.Startup"), this);
QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.Startup"));
upAndRunning(QStringLiteral("ksmserver"));
const AutoStart autostart;
QProcess::execute(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit_wrapper"), QStringList());
......
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