This will be used for flatpak to set a custom bus (which is really
the bus proxy). It can be used for testing purposes too.
For more details, see https://github.com/flatpak/flatpak/issues/79
https://bugzilla.gnome.org/show_bug.cgi?id=787126
{
DBusError error;
char *address = NULL;
+ const char *address_env = NULL;
if (a11y_bus && dbus_connection_get_is_connected (a11y_bus))
return a11y_bus;
if (!dbus_connection_allocate_data_slot (&a11y_dbus_slot))
g_warning ("at-spi: Unable to allocate D-Bus slot");
+ address_env = g_getenv ("AT_SPI_BUS_ADDRESS");
+ if (address_env != NULL && *address_env != 0)
+ address = g_strdup (address_env);
#ifdef HAVE_X11
- address = get_accessibility_bus_address_x11 ();
+ if (!address)
+ address = get_accessibility_bus_address_x11 ();
#endif
if (!address)
address = get_accessibility_bus_address_dbus ();