Open Bug 1756369 Opened 4 years ago Updated 22 days ago

Firefox flatpak shouldn't require org.a11y.Bus permission

Categories

(Core :: Widget: Gtk, defect)

Firefox 97
Unspecified
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tingping, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: gtk-severity-sweep-2026-10)

Steps to reproduce:

On Linux for accessibility Firefox talks to org.a11y.Bus to get the address of the bus.

This generally works however there is an environment variable, AT_SPI_BUS_ADDRESS, that is intended to override this behavior. It is respected by at-spi2-core itself as well as Qt, GTK, and WebKit.

This should be an easy change to a11y::PreInit() where it reads this env var before anything else.

This manifests itself as a problem most commonly when used inside of Flatpak. Flatpak itself creates a DBus proxy for this service for sandboxing and sets AT_SPI_BUS_ADDRESS to point to it. This means sometimes Firefox will attempt to connect to the wrong bus address.

Once this is respected the permission can also be removed from the Flatpak manifest.

OS: Unspecified → Linux

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

(In reply to Patrick from comment #0)

This should be an easy change to a11y::PreInit() where it reads this env var before anything else.

Looking into the codebase a bit more it seems Firefox doesn't even directly call org.a11y.Bus.GetAddress(). It only checks for the org.a11y.Status.IsEnabled property.

I think the actual solution here is to use the org.freedesktop.portal.Settings interface to check if its enabled inside of Flatpak.

Summary: AT_SPI_BUS_ADDRESS is not respected on Linux → Firefox flatpak shouldn't require org.a11y.Bus permission

What setting should we query? We already query portal settings in here.

Its the same as the GSetting just proxied over the portal.

gdbus call -e -d org.freedesktop.portal.Desktop -o /org/freedesktop/portal/desktop -m org.freedesktop.portal.Settings.Read org.gnome.desktop.interface toolkit-accessibility
(<<false>>,)

This is still somewhat problematic as its GNOME specific. I do not know if xdg-desktop-portal-kde or others have their own settings for this.

I see. If we disable the DBus call we should end up using plain GSettings instead. Would that work and if not, are all our gsettings read busted on flatpak?

Severity: -- → S3
Whiteboard: gtk-severity-sweep-2026-10

GSettings does not expose any host setting inside of flatpak.

You need to log in before you can comment on or make changes to this bug.