summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-bus.c
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2006-09-30 19:38:34 +0000
committerThiago Macieira <thiago@kde.org>2006-09-30 19:38:34 +0000
commitf6fa010403cb2badd88ce096ae91f664418508d1 (patch)
tree67227726b518356870813b33bc346bda9be32e18 /dbus/dbus-bus.c
parent5f292c611fc60bf3115dcf3d1213fdedc36fc65c (diff)
* configure.in: add DBUS_BINDIR as a #define to C source code.
* tools/dbus-launch.c * tools/dbus-launch.h * tools/dbus-launch-x11.c: * tools/dbus-launch.1: Add the --autolaunch option to dbus-launch, which makes it scan for an existing session started with --autolaunch. With that option, it also creates an X11 window and saves the bus address and PID to it. * dbus/dbus-sysdeps.h: * dbus/dbus-sysdeps-unix.c (_dbus_get_autolaunch_address): Add a function that runs "dbus-launch --autolaunch" to retrieve the running D-Bus session address (or start one if none was running) * dbus/dbus-transport.c: Add the handler for the "autolaunch:" address protocol, which tries to get the running session from dbus-launch. * dbus/dbus-bus.c: * dbus/dbus-internals.h: Make "autolaunch:" be the default D-Bus session bus address. * dbus/dbus-connection.c: Fix horrible typo in error message.
Diffstat (limited to 'dbus/dbus-bus.c')
-rw-r--r--dbus/dbus-bus.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c
index 5f5c3395..eb6b3ab3 100644
--- a/dbus/dbus-bus.c
+++ b/dbus/dbus-bus.c
@@ -175,6 +175,13 @@ init_connections_unlocked (void)
if (!get_from_env (&bus_connection_addresses[DBUS_BUS_SESSION],
"DBUS_SESSION_BUS_ADDRESS"))
return FALSE;
+
+ if (bus_connection_addresses[DBUS_BUS_SESSION] == NULL)
+ bus_connection_addresses[DBUS_BUS_SESSION] =
+ _dbus_strdup (DBUS_SESSION_BUS_DEFAULT_ADDRESS);
+ if (bus_connection_addresses[DBUS_BUS_SESSION] == NULL)
+ return FALSE;
+
_dbus_verbose (" \"%s\"\n", bus_connection_addresses[DBUS_BUS_SESSION] ?
bus_connection_addresses[DBUS_BUS_SESSION] : "none set");
}