From 7381f5d848975729c87d66d91a53dfa1a28bb44a Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 11 May 2023 17:30:54 +0200 Subject: 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 --- src/dbus-lib/dbusdaemon.cpp | 4 ++-- 1 file 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 -- cgit v1.2.1