From d20729fa7d323b771ec7f62f8d5d227849753941 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 May 2023 17:10:15 +0200 Subject: Force our session bus to be a file-based socket on Linux Different versions of libdbus handle the default listen address (unix:tmpdir=/tmp) differently: you may get a file-based socket (Debian/sid), but you also may get an abstract socket (Ubuntu 22.04). Change-Id: I703679e5f9b0315027a4b2cabd5db1800870ab00 Reviewed-by: Dominik Holland (cherry picked from commit 82b6a97147ff3e921998fcec269b79c842ee432f) Reviewed-by: Qt Cherry-pick Bot --- src/dbus-lib/dbusdaemon.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dbus-lib/dbusdaemon.cpp b/src/dbus-lib/dbusdaemon.cpp index 7c01a28b..6639f1c3 100644 --- a/src/dbus-lib/dbusdaemon.cpp +++ b/src/dbus-lib/dbusdaemon.cpp @@ -35,7 +35,12 @@ DBusDaemonProcess::DBusDaemonProcess(QObject *parent) arguments << address; #elif defined(Q_OS_WIN) - arguments << qSL(" --address=tcp:host=localhost"); + arguments << qSL("--address=tcp:host=localhost"); +#elif defined(Q_OS_LINUX) + // some dbus implementations create an abstract socket by default, while others create + // a file based one. we need a file based one however, because that socket might get + // mapped into a container. + arguments << qSL("--address=unix:dir=/tmp"); #endif setProgram(program); setArguments(arguments); -- cgit v1.2.1