at-spi-bus-launcher can outlive a KDE X11 session and subsequently fails to start registryd
I'm trying to use AT-SPI2 on a Steam Deck, and I'm seeing the following behavior: In the first session after a clean boot, I can connect to the AT-SPI2 dbus and communicate with applications. If I log out and back in, I get an UnknownMethod error when calling the org.a11y.atspi.Registry.RegisterEvent method. I find that at-spi2-registryd is not running. If I run it manually myself, it seems to work, except that any program started before that isn't connected to AT-SPI2.
From syslog, I find that at-spi2-registryd
is aborting with AT-SPI: Cannot open default display
.
It turns out that at-spi-bus-launcher
, and the AT-SPI bus, are surviving the logout and still have the environment from the old session. This means that the value of XAUTHORITY
in these processes and inherited by at-spi2-registry
is out of date.
I think that at-spi-bus-launcher
should shut down when the X11 session ends. It would do this on GNOME, of course, but KDE does not support the org.gnome.SessionManager
interface. It doesn't exit with the session DBus because the session DBus seems to just stick around permanently on this system and is not tied to the X11 session lifetime. It doesn't exit with SIGTERM because..... I don't know why. Is something supposed to send that?
I'm still not clear on how at-spi-bus-launcher
has X11 variables in its environment when I'd expect it to be started by the session bus which does not.
I'm not sure how the end of the X11 session should be detected exactly. KDE does support XSMP.