Commit d7c1181a authored by Yaroslav Sidlovsky's avatar Yaroslav Sidlovsky 💬
Browse files

GetSessionByPID DBUS call always fails on newer systemd versions

GetSessionByPID returns this error:
Error org.freedesktop.login1.NoSessionForPID: PID 2469 does not belong to any known session
So instead we will get session by calling GetSession("auto").
Tested on Fedora, should also work on openSUSE & KDE Neon.

BUG: 433408
parent c8efc338
......@@ -236,7 +236,7 @@ void PolicyAgent::onSessionHandlerRegistered(const QString & serviceName)
QDBusPendingReply<QDBusObjectPath> session =>asyncCall(QLatin1String("GetSessionByPID"), (quint32) QCoreApplication::applicationPid());
QDBusPendingReply<QDBusObjectPath> session =>asyncCall(QLatin1String("GetSession"), QLatin1String("auto"));
if (!session.isValid()) {
Supports Markdown
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