Commit 08178c05 authored by Fabian Vogt's avatar Fabian Vogt
Browse files

Load user information once on startup

Apparently the seccomp filter can break KUser in certain setups, so load the
info before the sandbox is active.

Test Plan:
Provided a test package to the reporter on the downstream bug
(, who reported

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 078d9ebd
......@@ -196,6 +196,11 @@ void UnlockApp::initialize()
const KUser user;
const QString fullName =;
m_userName = fullName.isEmpty() ? user.loginName() : fullName;
m_userImage = user.faceIconPath();
......@@ -297,11 +302,9 @@ void UnlockApp::desktopResized()
// engine stuff
QQmlContext* context = view->engine()->rootContext();
const KUser user;
const QString fullName =;
context->setContextProperty(QStringLiteral("kscreenlocker_userName"), fullName.isEmpty() ? user.loginName() : fullName);
context->setContextProperty(QStringLiteral("kscreenlocker_userImage"), user.faceIconPath());
context->setContextProperty(QStringLiteral("kscreenlocker_userName"), m_userName);
context->setContextProperty(QStringLiteral("kscreenlocker_userImage"), m_userImage);
context->setContextProperty(QStringLiteral("authenticator"), m_authenticator);
context->setContextProperty(QStringLiteral("org_kde_plasma_screenlocker_greeter_interfaceVersion"), 2);
context->setContextProperty(QStringLiteral("org_kde_plasma_screenlocker_greeter_view"), view);
......@@ -110,6 +110,7 @@ private:
bool m_canSuspend = false;
bool m_canHibernate = false;
QString m_userName, m_userImage;
KWayland::Client::ConnectionThread *m_ksldConnection = nullptr;
KWayland::Client::Registry *m_ksldRegistry = nullptr;
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