aboutsummaryrefslogtreecommitdiffstats
path: root/community/sddm/0003-disable-automatic-portal-launching.patch
blob: 6b2095a5a894ba1153be94abeef8262036b5a795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From a0dd7b641b98534961522753071fbf4143751a98 Mon Sep 17 00:00:00 2001
From: Harald Sitter <sitter@kde.org>
Date: Mon, 24 Oct 2022 13:15:48 +0200
Subject: [PATCH] disable automatic portal launching

in Qt6 (and the KDE patch collection for Qt 5) genericunixservices will
internally attempt to probe the portal tech early on in the app life
cycle. this causes the protal system to launch app and then crash
because we aren't actually providing a fully functional session. instead
opt out of this altogether

Patch modified to apply properly on SDDM 0.19.0
---
 src/greeter/GreeterApp.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp
index bbce512..183f7d1 100644
--- a/src/greeter/GreeterApp.cpp
+++ b/src/greeter/GreeterApp.cpp
@@ -334,6 +334,9 @@ int main(int argc, char **argv)
         QSurfaceFormat::setDefaultFormat(format);
     }
 
+    // Qt internally may load the xdg portal system early on, prevent this, we do not have a functional session running.
+    qputenv("QT_NO_XDG_DESKTOP_PORTAL", "1");
+
     QGuiApplication app(argc, argv);
 
     QCommandLineParser parser;