GNOME Bugzilla – Bug 461710
Do not set GNOME_ACCESSIBILITY environment variable.
Last modified: 2007-07-31 08:41:46 UTC
This bug is based on bug 435325#8, in which Li Yuan (atk developer) states: > Why GNOME_ACCESSIBILITY is automatically turned on by jhbuild? If > it want to start applications with A11Y support, the official way > is to set gconf key. GNOME_ACCESSIBILITY should only be turned on by > A11Y developers who want to see these messages. So, I think jhbuild should not set GNOME_ACCESSIBILITY=1.
It was added for automated testing with LDTP and Dogtail, which are based on the accessibility framework. I really don't want to disable that feature, documenting how it is required to enable accessibility and so on if the only inconvenience are two lines printed on program startups.
Yes. On GNOME2.16 or earlier, user can set GNOME_ACCESSIBILITY=1 to enable accessibility support if the hole desktop's accessibility is not enabled (the at-spi-registryd is started by bonobo). On GNOME2.18, we change the way it works. registryd should only be started by gnome-session through exec. That means setting GNOME_ACCESSIBILITY=1 to enable accessibility is no longer supported. So GNOME_ACCESSIBILITY should now only be used by accessibility developers.
I am note sure I understand everything yet. As I understand it you mean it is no longer required to have GNOME_ACCESSIBILITY set to 1 for LDTP and Dogtail tests to work. Is this true ?
Hi Frederic, sorry I didn't describe it clearly. There are two ways to enable the whole desktop's accessibility, set the gconf key "/desktop/gnome/interface/accessibility" to true or set GNOME_ACCESSIBILITY to true. Both of them should works. So if you have set the gconf key, then setting GNOME_ACCESSIBILITY is not required. And I think a better way is to set the gconf key to true for normal desktop uses. Can we use the gconf key way instead of the environment variable way?
Note jhbuild is not interested in the whole desktop accessibility, just interested in running LDTP/Dogtail tests, and it often doesn't have the whole desktop stack running. What should jhbuild do to tell gedit (or whatever) to run with accessibility enabled ?
Is there gnome-session running when LDTP/Dogtail testing?
No gnome-session, sorry.
Then I wonder how at-spi-registryd is started? Normally it is started by gnome-session.
Well, LDTP tests were a summe of code project from last year, so 2.14, which if I understand things correctly didn't have at-spi-registryd. Perhaps I shouldn't let jhbuild care and delegate correct initialisation of the subsystem to LDTP and Dogtail. I'll ponder over this for a few hours and will remove the GNOME_ACCESSIBILITY settings afterwards.
Thanks. I think LDTP/Dogtail do not only need to tell applications to start with accessibility support but also need to start at-spi-registryd to enable the accessibility frame work, or there is no use to only start applications with accessibility support. Now, at-spi-registryd is started by gnome-session on normal desktop. Maybe LDTP/Dogtail start it by itself, if so, setting GTK_MODULES to "gail:atk-bridge" can tell applications to load accessibility libraries. But if at-spi-registryd is started by gnome-session in LDTP/Dogtail, we still need to tell gnome-session to start it, by setting either the environment variable or the gconf key.
(In reply to comment #5) > Note jhbuild is not interested in the whole desktop accessibility, just > interested in running LDTP/Dogtail tests, and it often doesn't have the whole > desktop stack running. What should jhbuild do to tell gedit (or whatever) to > run with accessibility enabled ? Frédéric, perhaps it would enhance jhbuild to have a way to override GConf settings in some cases? This could be done by pre-pending a GConf path with jhbuild specific settings. (I understand this might be a way to turn on a11y if it's still useful.)
Loïc, as I understand it, the GConf key is looked at by gnome-session, so it wouldn't work for the "LDTP starting gedit for testing" usecase. But that idea of overriding GConf settings, I'll keep it for other things :)
I realize this bug is for the GNOME_ACCESSIBILITY environment variable. At the 2006 GNOME Boston Summit, however, we agreed to enable accessibility by default in GNOME development/unstable builds. This has since been implemented (I believe) as part of bug 362457.
From http://bugzilla.gnome.org/attachment.cgi?id=76528, this has been done by setting gconf key. So I think it is OK that don't set GNOME_ACCESSIBILITY.
I'd say that jhbuild can set the env var only when needed, i.e. when a "test" (or whatever it is called) action is executed, not for every action (e.g. build, buildone, run).
I am still not sure this is ok for tests, but at least this won't be a regression and you will have a clean environment in other (most) cases. 2007-07-31 Frederic Peters <fpeters@0d.be> * jhbuild/config.py, jhbuild/modtypes/testmodule.py: added forgotten test module, required to run LDTP and Dogtail tests; use it to set accessibility environment variables (closes: #461710)