summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2019-01-16 15:10:59 +0100
committerKai Uwe Broulik <[email protected]>2019-01-16 15:10:59 +0100
commit30e61b4aa4e73b0cc87cf26d78eb39d8eab8ce3d (patch)
treeea8778cad6912b483d215fbc37ce6bbd08292e98
parentdfd02160746bb4514acd81b065fac138ee1c7512 (diff)
[Greeter] Ignore unwritable configuration files
When opening a non-writable config file, a kdialog process is spawned and the application waits for it to quit. However, since in case of the lock screen, the input and everything is already blocked, the user cannot dismiss the warning generated by the greeter, effectively locking the user out. BUG: 403255 Differential Revision: https://phabricator.kde.org/D18291
-rw-r--r--greeter/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/greeter/main.cpp b/greeter/main.cpp
index 6db87e1..bdc3709 100644
--- a/greeter/main.cpp
+++ b/greeter/main.cpp
@@ -80,6 +80,10 @@ int main(int argc, char* argv[])
if (!qEnvironmentVariableIsSet("QT_IM_MODULE") || (qEnvironmentVariableIsSet("QT_IM_MODULE") && qgetenv("QT_IM_MODULE") != QByteArrayLiteral("maliit"))) {
qputenv("QT_IM_MODULE", QByteArrayLiteral("qtvirtualkeyboard"));
}
+
+ // Suppresses modal warnings about unwritable configuration files which may render the system inaccessible
+ qputenv("KDE_HOME_READONLY", "1");
+
ScreenLocker::UnlockApp app(argc, argv);
app.setQuitOnLastWindowClosed(false);
QCoreApplication::setApplicationName(QStringLiteral("kscreenlocker_greet"));