GNOME Accessibility Logo

GNOME Accessibility Team

AT-SPI: CORBA to D-Bus Mapping

/!\ The following content is being kept here for historical preservation only. The information contained herein may or may not be accurate. It is definitely not being maintained.

GIT Repositories and Files they Install

The AT-SPI infrastructure lives in the following GIT repositories. Note that GTK+'s GAIL module lives with GTK+ and is not discussed here.

General ATK Support

The atk module from git://git.gnome.org/atk is used by both the AT-SPI/CORBA and AT-SPI/D-Bus solutions. It provides the normalizing object model for toolkits such as GTK+, Gecko, and OOo to use and it provides the following files:

   /usr/include/atk-1.0/ - include files
   /usr/lib/libatk-1.0.* - libraries
   /usr/lib/pkgconfig/atk.pc - pkgconfig support
   /usr/share/locale/*/LC_MESSAGES/atk10.mo - locale support for ATK strings (e.g., rolenames)

It is typically built with the following arguments:

./autogen.sh --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec

AT-SPI/CORBA

The AT-SPI/CORBA files are all lumped under git://git.gnome.org/at-spi. With at-spi 1.29.2 and greater, the configure file provides a --enable-relocate feature which is enabled by default. If enabled, the at-spi files are installed to non-standard locations and the /desktop/gnome/interface/at-spi-corba boolean gconf key is used to determine whether the files should be used or not. Note that you will need both the /desktop/gnome/interface/accessibility and /desktop/gnome/interface/at-spi-corba boolean gconf keys set in order to use the CORBA version.

If --enable-relocate is used, which is the default, the files are installed in the following locations. The relocated files are prefixed with "[r]":

   /etc/gconf/schemas/at-spi.schemas - holds the new /desktop/gnome/interface/at-spi-corba key
   /etc/xdg/autostart/at-spi-registryd.desktop - launches /usr/lib/at-spi-registryd if /desktop/gnome/interface/accessibility is true
   /usr/include/at-spi-1.0/cspi/* - include files
   /usr/include/at-spi-1.0/libspi/* - include files
   /usr/include/at-spi-1.0/login-helper/* - include files
   /usr/lib/at-spi-registryd - the CORBA registryd - only stays running of /desktop/gnome/interface/at-spi-corba is true
   /usr/lib/bonobo/servers/Accessibility_Registry.server - Bonobo activation support
[r]/usr/lib/gtk-2.0/modules/at-spi-corba/modules/libatk-bridge.* - GTK+ module for the CORBA bridge
   /usr/lib/libcspi.* - C API Bindings
   /usr/lib/libloginhelper.* - Bindings for helper for login screen
   /usr/lib/libspi.* - SPI Bindings
   /usr/lib/orbit-2.0/Accessibility_LoginHelper_module.* - Bonobo/ORBit/CORBA support for login helper
   /usr/lib/orbit-2.0/Accessibility_module.* - Bonobo/ORBit/CORBA support for AT-SPI
   /usr/lib/pkgconfig/cspi-1.0.pc - pkgconfig file
   /usr/lib/pkgconfig/libloginhelper-1.0.pc - pkgconfig file
   /usr/lib/pkgconfig/libspi-1.0.pc - pkgconfig file
[r]/usr/lib/python2.6/site-packages/pyatspi_corba - relocated 'pyatspi' module if enable-relocate is true
   /usr/share/doc/at-spi-1.28.0 - API docs
[r]/usr/share/gnome/autostart/atk-bridge.desktop - sets GTK_PATH for gnome-session to pick up relocated CORBA atk-bridge module -- only shipped if relocation is used and only runs if /desktop/gnome/interface/at-spi-corba is set
   /usr/share/idl/at-spi-1.0 - API IDL
   /usr/share/locale/*/LC_MESSAGES/at-spi.mo - translations for 2 strings that describe the Accessibility_Registry

If the /desktop/gnome/interface/at-spi-corba flag is set, the D-Bus pyatspi module will replace itself with the pyatspi_corba module so that anything doing an import pyatspi will get the pyatspi_corba module.

If --disable-relocate is used, things will be installed as they were in GNOME 2.28.x and prior. So, the bridge module and pyatspi modules are not relocated and /usr/share/gnome/autostart/atk-corba-bridge.desktop will not be shipped.

   /usr/lib/gtk-2.0/modules/libatk-bridge.* - GTK+ module for the CORBA bridge
   /usr/lib/python2.6/site-packages/pyatspi - relocated 'pyatspi' module if enable-relocate is true

NOTE that the at-spi-registryd will automatically exit if /desktop/gnome/interface/at-spi-corba is not set. So, it is necessary to set this gconf key regardless of whether --enable-relocate has been used or not.

AT-SPI/D-Bus

The AT-SPI/D-Bus support breaks AT-SPI into several repositories. The goal is to allow the modules to be better shared with toolkits such as KDE's Qt toolkit. As a result, some GNOME-isms need to be separated out. The three repositories are as follows:

at-spi2-core

git://git.gnome.org/at-spi2-core provides the core D-Bus definitions and files needed for running the registryd

   /etc/at-spi2/accessibility.conf - D-Bus configuration
   /etc/xdg/autostart/at-spi-dbus-bus.desktop - launches /usr/lib/at-spi-dbus-bus if /desktop/gnome/interface/accessibility is true
   /usr/bin/at-spi-dbus-bus - the accessibility-specific D-Bus bus to allow multiple users to access the same bus (e.g., root applications on the desktop)
   /usr/libexec/at-spi2-registryd - the D-Bus registryd
   /usr/share/at-spi2/dbus/* - D-Bus XML interface definitions for AT-SPI
   /usr/share/dbus-1/services/org.freedesktop.atspi.Registry.service - D-Bus activation support

at-spi2-atk

git://git.gnome.org/at-spi2-atk provides the AT-SPI/D-Bus GTK+ atk-bridge module:

  /usr/lib/gtk-2.0/modules/libatk-bridge.* - GTK+ module for the D-Bus bridge

If you wish to relocate the D-Bus bridge module, you can use the --enable-relocate flag. This will result in the following files being installed, where the relocated files are prefixed with "[r]":

[r]/usr/share/gnome/autostart/atk-bridge.desktop - sets GTK_PATH for gnome-session to pick up relocated CORBA atk-bridge module -- only shipped if relocation is used and only runs if /desktop/gnome/interface/at-spi-dbus is set
[r]/usr/lib/gtk-2.0/modules/at-spi-dbus/modules/libatk-bridge.* - GTK+ module for D-Bus bridge

pyatspi2

git://git.gnome.org/pyatspi2 provides the AT-SPI/D-Bus 'pyatspi' module:

/usr/lib/python2.6/site-packages/pyatspi - the 'pyatspi' python module
or
/usr/lib/python2.6/site-packages/pyatspi_dbus - relocated 'pyatspi' module if --enable-relocate is used

If the /desktop/gnome/interface/at-spi-dbus flag is set, the CORBA pyatspi module will replace itself with the pyatspi_dbus module so that anything doing an import pyatspi will get the pyatspi_dbus module.

Installation Notes

AT-SPI/CORBA is the default and AT-SPI/D-Bus has been relocated

In this situation, the CORBA implementation is the default and the D-Bus implementation has been relocated. The D-Bus implementation should only be used if the /desktop/gnome/interface/at-spi-dbus key has been set and the CORBA implementation should ensure it doesn't run if this same key has been set.

We also have the following key files installed. Note that /usr/lib/gtk-2.0/modules/libgail.*, /usr/lib/libatk-1.0.* and other files independent of CORBA and D-Bus are still installed in their normal spots regardless of relocation.

  • CORBA (required):
    • /etc/xdg/autostart/at-spi-registryd.desktop - at session initialization time, launches $libexecdir/at-spi-registryd if /desktop/gnome/interface/accessibility is True

    • /usr/lib/bonobo/servers/Accessibility_Registry.server - Bonobo activation for $libexecdir/at-spi-registryd (this is a vestige of the past -- the *.desktop file above launches the registryd at login time).

    • $libexecdir/at-spi-registryd - the CORBA registryd. Can be launched via the .desktop file above on login or Bonobo activation (Bonobo activation is a vestige of the past -- we mean for this to be launched only via session initialization). Always sets AT_SPI_IOR property on the root window. If launched at login via the *.desktop file, this will participate in session management and will set GTK_MODULES to gail:atk-bridge.

    • /usr/lib/gtk-2.0/modules/libatk-bridge.* - the GTK module for the CORBA atk-bridge.

    • /usr/lib/python2.*/.../pyatspi - the CORBA pyatspi bindings. The CORBA pyatspi module will replace itself with the pyatspi_dbus module if /desktop/gnome/interface/at-spi-dbus is True and the pyatspi_dbus module has been installed.

  • D-Bus (optional):
    • /usr/share/gnome/autostart/atk-bridge.desktop - sets the session manager's GTK_PATH environment variable to /usr/lib/gtk-2.0/modules/at-spi-dbus if /desktop/gnome/interface/at-spi-dbus is True. This allows the D-Bus atk-bridge module to be found before the CORBA atk-bridge module.

    • /etc/xdg/autostart/at-spi-dbus-bus.desktop - launches the AT-SPI D-Bus bus at session initialization time if the /desktop/gnome/interface/accessibility key is True. Sets the AT_SPI_DBUS property on the root window when it launches.

    • /usr/share/dbus-1/services/org.freedesktop.atspi.Registry.service - D-Bus activation for at-spi2-registryd

    • $libexecdir/at-spi2-registryd - the D-Bus registryd launched only by D-Bus activation. Connects to the bus referred to by the AT_SPI_BUS property on the root window if the property exists, otherwise connects to the session bus. Also participates in session management if launched with --use-gnome-session.

    • /usr/lib/gtk-2.0/modules/at-spi-dbus/modules/libatk-bridge - the relocated GTK module for the D-Bus atk-bridge. Needs GTK_PATH set to /usr/lib/gtk-2.0/modules/at-spi-dbus in order for it to be found.

    • /usr/lib/python2.*/.../pyatspi_dbus - the D-Bus pyatspi bindings. The CORBA pyatspi module will replace itself with this module if /desktop/gnome/interface/at-spi-dbus is True.

Here's a truth table for the situation where based upon the situation where AT-SPI/CORBA is the default and AT-SPI/D-Bus has been relocated:

  • accessibility - this is the /desktop/gnome/interface/accessibility boolean. It is the main key used to determine whether accessibility should be enabled or not

  • at-spi-corba - this is the /desktop/gnome/interface/at-spi-corba boolean. It is meant to be used *only* when the AT-SPI/CORBA support has been relocated and indicates if the AT-SPI/CORBA support is to be used instead of AT-SPI/D-Bus. It should be ignored if AT-SPI/CORBA has not been relocated.

  • at-spi-dbus - this is the /desktop/gnome/interface/at-spi-dbus boolean. It is meant to be used *only* when the AT-SPI/D-Bus support has been relocated and indicates if the AT-SPI/D-Bus support is to be used instead of AT-SPI/CORBA. It should be ignored if AT-SPI/D-Bus has not been relocated.

accessibility

at-spi-corba

at-spi-dbus

actions

F

F

F

Nothing should start when you log in and no GTK modules for a11y should be loaded.

F

F

T

Nothing should start when you log in and no GTK modules for a11y should be loaded.

F

T

F

Nothing should start when you log in and no GTK modules for a11y should be loaded.

F

T

T

Nothing should start when you log in and no GTK modules for a11y should be loaded.

T

F

F

The CORBA infrastructure should be used. Any a11y-related D-Bus service should quit if launched.

T

F

T

The D-Bus infrastructure should be used. Any a11y-related CORBA service should quit if launched.

T

T

F

The CORBA infrastructure should be used. Any a11y-related D-Bus service should quit if launched.

T

T

T

Tie goes to D-Bus. The D-Bus infrastructure should be used. Any a11y-related CORBA service should quit if launched.

Issues:

  • The at-spi-dbus-bus causes hangs. Note to WillieWalker: for now, maybe consider not installing this file.

  • When D-Bus has been relocated, the at-spi-dbus-bus should not run unless /desktop/gnome/interface/at-spi-dbus is True. Note to WillieWalker: modify the at-spi-dbus-bus script to quit if the key is not set.

  • Need to be aware of Bonobo and D-Bus activation. May cause a registryd to be launched unexpectedly. We might consider having at-spi2-registryd check the gconf key settings and exit appropriately, but this might not be necessary since nothing should be tickling it unless it is needed.

AT-SPI/D-Bus is the default and AT-SPI/CORBA has been relocated

In this situation, the D-Bus implementation is the default and the CORBA implementation has been relocated. The CORBA implementation should only be used if the /desktop/gnome/interface/at-spi-corba key has been set and the D-Bus implementation should ensure it doesn't run if this same key has been set.

We also have the following key files installed. Note that, as above, /usr/lib/gtk-2.0/modules/libgail.*, /usr/lib/libatk-1.0.* and other files independent of CORBA and D-Bus are still installed in their normal spots regardless of relocation.

  • CORBA (optional):
    • /etc/xdg/autostart/at-spi-registryd.desktop - at session initialization time, launches $libexecdir/at-spi-registryd if /desktop/gnome/interface/accessibility is True.

    • /usr/lib/bonobo/servers/Accessibility_Registry.server - Bonobo activation for $libexecdir/at-spi-registryd (this is a vestige of the past -- the *.desktop file above launches the registryd at login time).

    • $libexecdir/at-spi-registryd - the CORBA registryd. Can be launched via the *.desktop file above on login or Bonobo activation (Bonobo activation is a vestige of the past -- we mean for this to be launched only via session initialization). This will immediately exit and perform no changes to the system if /desktop/gnome/interface/at-spi-corba is not True. Otherwise, always sets AT_SPI_IOR property on the root window. If launched at login via the *.desktop file, this will participate in session management and will set GTK_MODULES to gail:atk-bridge. Also sets the session manager's GTK_PATH environment variable to /usr/lib/gtk-2.0/modules/at-spi-corba so that the CORBA atk-bridge module is found before the D-Bus atk-bridge module.

    • /usr/lib/gtk-2.0/modules/at-spi-corba/modules/libatk-bridge.* - the GTK module for CORBA atk-bridge. Needs GTK_PATH set to /usr/lib/gtk-2.0/modules/at-spi-corba in order for it to be found.

    • /usr/lib/python2.*/.../pyatspi_corba - the CORBA pyatspi bindings. The D-Bus pyatspi module will replace itself with the pyatspi_corba module if /desktop/gnome/interface/at-spi-corba is True and the pyatspi_corba module has been installed.

  • D-Bus (required):
    • /usr/share/gnome/autostart/atk-bridge.desktop - NOT INSTALLED.

    • /etc/xdg/autostart/at-spi-dbus-bus.desktop - launches the AT-SPI D-Bus bus at session initialization time if the /desktop/gnome/interface/accessibility key is True. Sets the AT_SPI_DBUS property on the root window when it launches.

    • /usr/share/dbus-1/services/org.freedesktop.atspi.Registry.service - D-Bus activation for at-spi2-registryd

    • $libexecdir/at-spi2-registryd - the D-Bus registryd launched only by D-Bus activation. Connects to the bus referred to by the AT_SPI_BUS property on the root window if the property exists, otherwise connects to the session bus. Also participates in session management if launched with --use-gnome-session.

    • /usr/lib/gtk-2.0/modules/libatk-bridge - the GTK module for the D-Bus atk-bridge.

    • /usr/lib/python2.*/.../pyatspi - the D-Bus pyatspi bindings. The D-Bus pyatspi module will replace itself with the pyatspi_corba module if /desktop/gnome/interface/at-spi-corba is True and the pyatspi_corba module has been installed.

Here's a truth table for the situation where based upon the situation where AT-SPI/D-Bus is the default and AT-SPI/CORBA has been relocated:

  • accessibility - this is the /desktop/gnome/interface/accessibility boolean. It is the main key used to determine whether accessibility should be enabled or not

  • at-spi-corba - this is the /desktop/gnome/interface/at-spi-corba boolean. It is meant to be used *only* when the AT-SPI/CORBA support has been relocated and indicates if the AT-SPI/CORBA support is to be used instead of AT-SPI/D-Bus. It should be ignored if AT-SPI/CORBA has not been relocated.

  • at-spi-dbus - this is the /desktop/gnome/interface/at-spi-dbus boolean. It is meant to be used *only* when the AT-SPI/D-Bus support has been relocated and indicates if the AT-SPI/D-Bus support is to be used instead of AT-SPI/CORBA. It should be ignored if AT-SPI/D-Bus has not been relocated.

accessibility

at-spi-corba

at-spi-dbus

actions

F

F

F

Nothing should start when you log in and no GTK modules should be loaded.

F

F

T

Nothing should start when you log in and no GTK modules should be loaded.

F

T

F

Nothing should start when you log in and no GTK modules should be loaded.

F

T

T

Nothing should start when you log in and no GTK modules should be loaded.

T

F

F

The D-Bus infrastructure should be used. Any a11y-related CORBA service should quit if launched.

T

F

T

The D-Bus infrastructure should be used. Any a11y-related CORBA service should quit if launched.

T

T

F

The CORBA infrastructure should be used. Any a11y-related D-Bus service should quit if launched.

T

T

T

Tie goes to CORBA. The CORBA infrastructure should be used. Any a11y-related D-Bus service should quit if launched.

Issues:

  • The at-spi-dbus-bus causes hangs.
  • If /desktop/gnome/interface/at-spi-corba is True, the at-spi2-registryd should exit. Note that nothing should be launching at-spi2-registryd except D-Bus activation. So, it should never be activated under the condition where /desktop/gnome/interface/at-spi-corba is True unless someone does some unexpected action to tickle it (e.g., maybe import pyatspi_dbus explicitly in a Python module).

  • Need to be aware of Bonobo and D-Bus activation. May cause a registryd to be launched unexpectedly.

Coexistence Notes

With the default build settings in git master, the AT-SPI/CORBA and AT-SPI/D-Bus files coexist on the file system without conflict. The /desktop/gnome/interface/accessibility/ boolean gconf key is still used to determine whether accessibility support is desired for the system and AT-SPI/D-Bus is used as the accessibility solution by default. If one wants to use the AT-SPI/CORBA solution, they will also need to set the /desktop/gnome/interface/at-spi-corba boolean gconf key to true.

Note that Firefox, OOo, gdm all hardcode atk-bridge references and gnome-settings-daemon hardcodes "gail:atk-bridge" in its gconf settings. So, the name of the GTK+ module must stay at atk-bridge to reduce the number of changes that need to be made.

As a quick test, you can run the following command from a shell script:

python -c "import pyatspi; print(map(lambda x: x.name, filter(lambda x: x, pyatspi.Registry.getDesktop(0))))"

If you see output with D-Bus references in it (e.g., dbus.String(u'gnome-terminal')), then the system is set up to use AT-SPI/D-Bus. Here's a command you can cut/paste to turn the CORBA bindings on:

gconftool-2 --set /desktop/gnome/interface/at-spi-corba --type bool true

Accessibility/Documentation/GNOME2/CORBAToDBusMapping (last edited 2011-07-21 19:15:13 by JoanmarieDiggs)