summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am2
-rw-r--r--tools/dbus-launch.c19
2 files changed, 20 insertions, 1 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e653dea3..06d85b47 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION
+INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\"
bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index 757e833e..3004099c 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -771,6 +771,25 @@ main (int argc, char **argv)
verbose ("Calling exec()\n");
+ execl (DBUS_DAEMONDIR"/dbus-daemon",
+ DBUS_DAEMONDIR"/dbus-daemon",
+ "--fork",
+ "--print-pid", write_pid_fd_as_string,
+ "--print-address", write_address_fd_as_string,
+ config_file ? "--config-file" : "--session",
+ config_file, /* has to be last in this varargs list */
+ NULL);
+
+ fprintf (stderr,
+ "Failed to execute message bus daemon %s: %s. Will try again without full path.\n",
+ DBUS_DAEMONDIR"/dbus-daemon", strerror (errno));
+
+ /*
+ * If it failed, try running without full PATH. Note this is needed
+ * because the build process builds the run-with-tmp-session-bus.conf
+ * file and the dbus-daemon will not be in the install location during
+ * build time.
+ */
execlp ("dbus-daemon",
"dbus-daemon",
"--fork",