diff options
author | Robert Griebl <robert.griebl@qt.io> | 2023-05-11 17:30:54 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2023-05-15 17:54:36 +0200 |
commit | 1f14372e609dea84078a4d5ee3d0ca1acfde9dbb (patch) | |
tree | 4179c706932c7927d2b16fc12d776334ba607928 | |
parent | b75fdf6a571ee13035b4cbccde280f5fe7c01249 (diff) | |
download | qtapplicationmanager-1f14372e609dea84078a4d5ee3d0ca1acfde9dbb.tar.gz |
Force our session bus to be a file-based socket on Linux. (part 3)
Manually constructing a socket path on macOS and legacy Linux was
wrong and prevent the start of the dbus-daemon:
/tmpam/... instead of /tmp/am/...
Change-Id: I101f74b50ba0477cbf49b59bfc76982c60dc7e0b
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
(cherry picked from commit 7381f5d848975729c87d66d91a53dfa1a28bb44a)
-rw-r--r-- | src/dbus-lib/dbusdaemon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus-lib/dbusdaemon.cpp b/src/dbus-lib/dbusdaemon.cpp index 73f4cc66..45872827 100644 --- a/src/dbus-lib/dbusdaemon.cpp +++ b/src/dbus-lib/dbusdaemon.cpp @@ -87,7 +87,7 @@ DBusDaemonProcess::DBusDaemonProcess(QObject *parent) program = qSL("/usr/local/bin/dbus-daemon"); // brew's dbus-daemon needs an address, because it will otherwise assume that it was // started via launchd and expects its address in $DBUS_LAUNCHD_SESSION_BUS_SOCKET - QString address = qSL("--address=unix:path=") + QDir::tempPath() + qSL("am-") + QString address = qSL("--address=unix:path=") + QDir::tempPath() + qSL("/am-") + QString::number(QCoreApplication::applicationPid()) + qSL("-session.bus"); arguments << address; @@ -100,7 +100,7 @@ DBusDaemonProcess::DBusDaemonProcess(QObject *parent) if (dbusVersion() >= QVersionNumber(1, 11, 14)) { arguments << qSL("--address=unix:dir=/tmp"); } else { - arguments << QString(qSL("--address=unix:path=") + QDir::tempPath() + qSL("am-") + arguments << QString(qSL("--address=unix:path=") + QDir::tempPath() + qSL("/am-") + QString::number(QCoreApplication::applicationPid()) + qSL("-session.bus")); } #endif |