The desktop-legacy
interface is supposed to give a snap permission to talk to the at-spi service, which in turn allows it to be controlled by accessibility tools like screen readers. This became more obvious in Ubuntu 21.10 where Firefox has been migrated to a snap. It would affect all snaps that support a11y, and likely affects more distro releases.
The problem seems to have originated with this change to at-spi upstream, which was included in version 2.39.1:
https://gitlab.gnome.org/GNOME/at-spi2-core/-/merge_requests/51
This changed the socket location of at-spi’s private D-Bus daemon from the abstract namespace to a regular namespace unix socket. This poses a few difficulties:
- The socket is now located under
/tmp
, which is inaccessible due to snapd’s private tmp directory feature. - The socket is located directly under
/tmp
rather than in a sub-directory, which makes the mount tricks we used for exposing the non-abstract X11 sockets difficult.
I think the solution to this will probably require some changes upstream and some changes to snapd. My preferred fixes would be:
- Patch at-spi2-core to move the D-Bus socket. My preference would be to place the bus in a sub-directory of
$XDG_RUNTIME_DIR
. Maybe even with a fixed name, but that is not a hard requirement. - Patch snapd’s
desktop-legacy
interface to allow snaps to connect to the socket in the new location.
These changes should be transparent to applications, as applications discover the accessibility bus by calling the org.a11y.Bus.GetAddress
method on the D-Bus session bus.