DBusString *address,
DBusError *error)
{
+#ifdef DBUS_BUILD_X11
+ /* Perform X11-based autolaunch. (We also support launchd-based autolaunch,
+ * but that's done elsewhere, and if it worked, this function wouldn't
+ * be called.) */
+ const char *display;
static char *argv[6];
int i;
DBusString uuid;
if (display == NULL || display[0] == '\0')
{
dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
- "Unable to autolaunch a dbus-daemon without DISPLAY set");
+ "Unable to autolaunch a dbus-daemon without a $DISPLAY for X11");
return FALSE;
}
out:
_dbus_string_free (&uuid);
return retval;
+#else
+ dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
+ "Using X11 for dbus-daemon autolaunch was disabled at compile time, "
+ "set your DBUS_SESSION_BUS_ADDRESS instead");
+ return FALSE;
+#endif
}
/**