From 6fc4bac54f4d3bfa72634a621f5ef74715329e64 Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Thu, 4 May 2023 16:38:51 +0200 Subject: Limit WAYLAND_DISPLAY to control only client side The WAYLAND_DISPLAY environment variable not only controlled what server to connect to as a client in a nested setup, but also what server socket was established. This led to many unusable configurations (either the socket was already locked or not available). The server socket should be provided via the CL or configuration file only. Change-Id: I7fa54c7cc5b5f2baa49b8b68f8de4f98edfc94c0 Reviewed-by: Robert Griebl --- src/main-lib/configuration.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/main-lib/configuration.cpp b/src/main-lib/configuration.cpp index a689595b..40175ea7 100644 --- a/src/main-lib/configuration.cpp +++ b/src/main-lib/configuration.cpp @@ -1246,13 +1246,6 @@ QString Configuration::waylandSocketName() const if (!socketName.isEmpty()) return socketName; - const char *envName = "WAYLAND_DISPLAY"; - if (qEnvironmentVariableIsSet(envName)) { - socketName = qEnvironmentVariable(envName); - if (!QGuiApplication::platformName().startsWith(qSL("wayland")) || (socketName != qSL("wayland-0"))) - return socketName; - } - if (!m_data->wayland.socketName.isEmpty()) return m_data->wayland.socketName; -- cgit v1.2.1