Skip to content

Commit 27dd29e

Browse files
committed
Don't set X authority for Wayland user sessions
Issue: #419
1 parent 4f1f1f5 commit 27dd29e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/helper/UserSession.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ namespace SDDM {
8989
exit(Auth::HELPER_OTHER_ERROR);
9090
}
9191

92+
// Session type
93+
QString sessionType = processEnvironment().value("XDG_SESSION_TYPE");
94+
9295
//we cannot use setStandardError file as this code is run in the child process
9396
//we want to redirect after we setuid so that .xsession-errors is owned by the user
9497

@@ -112,6 +115,9 @@ namespace SDDM {
112115
qWarning() << "Could not redirect stdout";
113116
}
114117

118+
// set X authority for X11 sessions only
119+
if (sessionType != QStringLiteral("x11"))
120+
return;
115121
QString cookie = qobject_cast<HelperApp*>(parent())->cookie();
116122
if (!cookie.isEmpty()) {
117123
QString file = processEnvironment().value("XAUTHORITY");

0 commit comments

Comments
 (0)