diff options
author | Robert Griebl <robert.griebl@qt.io> | 2023-05-03 17:10:15 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2023-05-03 15:21:33 +0000 |
commit | 82b6a97147ff3e921998fcec269b79c842ee432f (patch) | |
tree | cb8eaa7e715c556392e2b6f12bf1ab879d70a317 | |
parent | 552a9a2a9948b63ac4ab7523c247b5429dcc7a80 (diff) | |
download | qtapplicationmanager-82b6a97147ff3e921998fcec269b79c842ee432f.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
Pick-to: 6.5 6.2 5.15
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r-- | src/dbus-lib/dbusdaemon.cpp | 7 |
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); |