summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2023-05-03 17:10:15 +0200
committerRobert Griebl <robert.griebl@qt.io>2023-05-05 04:17:19 +0000
commitd77424752c6284fd5c8af15ace40005c953d6d7f (patch)
tree65dc0b7a7cf361f3c2df4ed2d742bde4ef13df68
parent191bed03130d4116aa972f6a69d8d7026d94126b (diff)
downloadqtapplicationmanager-d77424752c6284fd5c8af15ace40005c953d6d7f.tar.gz
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 <dominik.holland@qt.io> (cherry picked from commit 82b6a97147ff3e921998fcec269b79c842ee432f)
-rw-r--r--src/dbus-lib/dbusdaemon.cpp7
1 files changed, 6 insertions, 1 deletions
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);