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-11 17:41:16 +0200 |
commit | 7381f5d848975729c87d66d91a53dfa1a28bb44a (patch) | |
tree | 7dd30795a6bc1a4bb72ae78ca5db9ba73afd61fe /src/dbus-lib | |
parent | a2aed270244c872c58dfdd945d1e5452ab23d057 (diff) | |
download | qtapplicationmanager-7381f5d848975729c87d66d91a53dfa1a28bb44a.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/...
Pick-to: 6.5 6.2 5.15
Change-Id: I101f74b50ba0477cbf49b59bfc76982c60dc7e0b
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'src/dbus-lib')
-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 71fc23f3..aff76402 100644 --- a/src/dbus-lib/dbusdaemon.cpp +++ b/src/dbus-lib/dbusdaemon.cpp @@ -50,7 +50,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; @@ -63,7 +63,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 |