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
wilder-5.22
David Edmundson 5 years ago committed by Henri Chain
parent 3754967b07
commit e7e4991671
  1. 2
      ksmserver/plasma-ksmserver.service.in
  2. 7
      ksmserver/server.cpp
  3. 1
      startkde/plasma-session/startup.cpp

@ -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());

Loading…
Cancel
Save