gentoo-ebuilds/x11-misc/sddm/files/sddm-0.21.0_p20250310-set-XAUTHLOCALHOSTNAME.patch
Andreas Sturmlechner 98be0495bc
x11-misc/sddm: add 0.21.0_p20250310
Rebase Xsession patch for upstream commit c220e921.
Add suse patch for setting XAUTHLOCALHOSTNAME, maybe helps bug 913862

Bug: https://bugs.gentoo.org/913862
Closes: https://bugs.gentoo.org/951326
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2025-03-21 23:38:46 +01:00

39 lines
1.6 KiB
Diff

From 39d30f19ac7948eb5e9ab2ef0f219ae770644f55 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Sat, 24 Oct 2020 13:57:05 +0200
Subject: [PATCH] Set XAUTHLOCALHOSTNAME in sessions
While FamilyWild avoids that hostname changes break xauth, this doesn't help
with Xtrans (used for ICE). Xtrans always uses the current host name for
setting $SESSION_MANAGER and for a successful connection this has to match
the current hostname (or $XAUTHLOCALHOSTNAME, see p_xauth.diff in xtrans)
on client connection attempts as well. By setting XAUTHLOCALHOSTNAME here,
it's likely that it equals the hostname set by the session manager later
(e.g. ksmserver).
---
src/helper/Backend.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/helper/Backend.cpp b/src/helper/Backend.cpp
index 91ca211..1b0bb6f 100644
--- a/src/helper/Backend.cpp
+++ b/src/helper/Backend.cpp
@@ -27,6 +27,7 @@
#include "UserSession.h"
#include <QtCore/QProcessEnvironment>
+#include <QtNetwork/QHostInfo>
#include <pwd.h>
@@ -73,6 +74,7 @@ namespace SDDM {
env.insert(QStringLiteral("SHELL"), QString::fromLocal8Bit(pw->pw_shell));
env.insert(QStringLiteral("USER"), QString::fromLocal8Bit(pw->pw_name));
env.insert(QStringLiteral("LOGNAME"), QString::fromLocal8Bit(pw->pw_name));
+ env.insert(QStringLiteral("XAUTHLOCALHOSTNAME"), QHostInfo::localHostName());
#if defined(Q_OS_FREEBSD)
/* get additional environment variables via setclassenvironment();
this needs to be done here instead of in UserSession::setupChildProcess
--
2.39.1