diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp index 2ecb2561e..778242538 100644 --- a/startkde/startplasma.cpp +++ b/startkde/startplasma.cpp @@ -452,8 +452,8 @@ bool hasSystemdService(const QString &serviceName) auto msg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.systemd1"), QStringLiteral("/org/freedesktop/systemd1"), QStringLiteral("org.freedesktop.systemd1.Manager"), - QStringLiteral("ListUnitsByNames")); - msg << QStringList({serviceName}); + QStringLiteral("ListUnitFilesByPatterns")); + msg << QStringList({QStringLiteral("enabled"), QStringLiteral("static")}) << QStringList({serviceName}); auto reply = QDBusConnection::sessionBus().call(msg); if (reply.type() == QDBusMessage::ErrorMessage) { return false; @@ -471,7 +471,7 @@ bool useSystemdBoot() return false; } - if (!hasSystemdService(QStringLiteral("plasma-workspace@ANY.target"))) { + if (!hasSystemdService(QStringLiteral("plasma-workspace@.target"))) { qWarning() << "Systemd boot requested, but plasma services were not found"; return false; }