The accessibility D-Bus bus needs to participate in session management. This is because it needs to inform the session manager when its initialization has finished so other apps can start loading.
Patch has been provided by Li Yuan:
There are two problems I found:
1. After applying my patch, the new bus is started after login. And when
I launch an application (say gedit), no warning comes out, indicating it
is using the new D-Bus bus. But if I start Accerciser or Orca, both of
the ATs hang. Attachment #2 [details] is the log of Accerciser, seems it can not
communicate with the bus. And at the same time, a new dbus-daemon is
launched, attachment #3 [details] [review] is the processes status before and after I ran
ATs. So this is a possible bug for pyatspi?
2. Since the dbus-daemon can not communicate with gnome-session, some of
the functions of session management can not work, e.g. auto restart or
quit when session quits. I think ideally the bus should be started by
gnome-session, so the bus can quit when gnome-session quits.
Created attachment 32632 [details] [review]
Patch to add session management participation, version 1
Created attachment 32885 [details] [review]
Partial fix -- moves us to Python for starting the bus and participating in session management
This converts the at-spi-dbus-bus file into a Python script that connects
to the session management API. It works OK except that:
1) The subprocess is not killed when I log out. I'm using the
'terminate' method to kill it and wonder if I should use 'kill' instead.
2) Launching the bus via the *.desktop file seems to still cause some
sort of hang when an assistive technology then uses pyatspi. The
test command I type is:
python -c "import pyatspi; print(map(lambda x: x.name, filter(lambda x: x, pyatspi.Registry.getDesktop(0))))"