After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 469958 - GNOME_SESSION environment missing with accessibility enabled
GNOME_SESSION environment missing with accessibility enabled
Status: RESOLVED OBSOLETE
Product: gnome-session
Classification: Core
Component: gnome-session
2.22.x
Other Linux
: Normal major
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-24 17:00 UTC by Calvin Gaisford
Modified: 2021-06-14 18:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch to move the accessibility startup lower in the process (1.44 KB, patch)
2007-08-24 17:03 UTC, Calvin Gaisford
none Details | Review
patch to main.c which moves the accessibility init code down in the process (1.18 KB, patch)
2007-08-28 22:35 UTC, Calvin Gaisford
none Details | Review
Updated patch with c style comment (1.19 KB, patch)
2007-08-31 22:05 UTC, Calvin Gaisford
needs-work Details | Review
gnome-session-2.20.0-safe-a11y-startup.patch (2.21 KB, patch)
2007-11-17 01:27 UTC, Hans Petter Jansson
none Details | Review

Description Calvin Gaisford 2007-08-24 17:00:20 UTC
Some of the recent changes in the location of the accessibility startup code (in main.c) seemed to have caused a problem where applets (specifically gnome-main-menu) are being started before the GNOME_SESSION is set up in the environment so any calls to connect to the session manager fail.  The result is users are no longer able to logout.

I'm not exactly sure what the accessibility is doing in the startup but it appears to be activating some components of the gnome-panel or applets which is happening before gnome-session has a chance to get set up.  There was a lot of discussion on this in bug #345428
Comment 1 Calvin Gaisford 2007-08-24 17:03:30 UTC
Created attachment 94275 [details] [review]
Patch to move the accessibility startup lower in the process

I've created a patch that fixes the issue but I'm not sure what accessibility issues this may also cause.  The patch simply moves the code to initialize accessibility down to happen after the initialize_ice() call.
Comment 2 Calvin Gaisford 2007-08-28 22:35:13 UTC
Created attachment 94531 [details] [review]
patch to main.c which moves the accessibility init code down in the process

The initial patch fixed some problems but some of the environment is still not being setup correctly if accessibility is enabled.  I moved the accessibility initialization back to where it was (right before gtk_main) and the environment is now correct when accessibility is enabled.
Comment 3 Calvin Gaisford 2007-08-28 22:38:48 UTC
Sorry, I should be more precise in my description.  The second patch moves the accessibility initialization back to where it was in revision 4285 of main.c.  Here is a link:

http://svn.gnome.org/viewcvs/gnome-session/trunk/gnome-session/main.c?revision=4285&view=markup
Comment 4 Kjartan Maraas 2007-08-31 08:02:31 UTC
I don't know the code well enough to comment on correctness etc, but please don't use c++ comments in patches for GNOME - we prefer /* */ type comments :-)
Comment 5 Calvin Gaisford 2007-08-31 22:05:21 UTC
Created attachment 94733 [details] [review]
Updated patch with c style comment
Comment 6 Vincent Untz 2007-11-13 00:02:25 UTC
What's wrong with your patch is that the a11y modules won't be loaded for processes started before.

The right fix is probably just moving gsm_assistive_registry_start() down a bit. Can you try this?
Comment 7 Calvin Gaisford 2007-11-14 03:15:56 UTC
Indeed, Hans Petter Jansson at Novell found the same issue and submitted a new patch for OpenSUSE that changes the location a bit.  I'll have him submit the patch here.
Comment 8 Hans Petter Jansson 2007-11-17 01:27:25 UTC
Created attachment 99238 [details] [review]
gnome-session-2.20.0-safe-a11y-startup.patch

This starts up the AT registry before the user's session.
Comment 9 Hans Petter Jansson 2007-11-17 01:29:26 UTC
I've tested this patch, and so have at least 3 others, and it's worked well. Note that I sneaked in a wait period of up to 10 seconds instead of 5 for the AT registry to start, since the "missing accessibility" dialog would show up for some users before.
Comment 10 Lucas Rocha 2008-04-08 22:46:51 UTC
Vincent, I guess Hans' patch is ok to be commited in gnome-2-22 branch? I tested it and it works ok.
Comment 11 Luke Yelavich 2009-03-16 09:56:14 UTC
I am seeing similar ehavior with gnome-session 2.25.92, 2.25.92-0ubuntu3 to be exact. Since Ubuntu now uses the Fast User switch applet by default for logging out/shutting down, this issue is only visible when the applet is removed, and standard logout/shutdown dialogs are installed.

On the Ubuntu 9.04 alpha 6 live CD, with accessibility enabled and the applet removed, the logout/shutdown dialogs are accessible, however running Ubuntu with same set up except for being on hard disk, the dialogs are not accessible. To check that the at-spi registry helper was being loaded too late for the hard disk install, I created a file in /etc/X11/Xsession.d to load /usr/lib/gnome-session/helpers/at-spi-registryd-wrapper. When the helper was run before gnome-session, the logout dialogs were fully accessible.

This appears to me that there is a race condition of some sort, since the dialogs on the live CD work fine, probably due to slower load speeds from the CD.
Comment 12 André Klapper 2021-06-14 18:22:23 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of gnome-session, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-session/-/issues/

Thank you for your understanding and your help.