Closed Bug 1749753 Opened 3 years ago Closed 2 years ago

[Snap] Support disconnecting firefox:home

Categories

(Core :: Widget: Gtk, defect)

Firefox 96
defect

Tracking

()

RESOLVED DUPLICATE of bug 1749771

People

(Reporter: kiebitz, Unassigned)

References

(Blocks 2 open bugs)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

  1. I installed FF using snap install firefox.
  2. I disconnected the home access, snap disconnect firefox:home
  3. Firefox failed to use xdg-desktop-portals

Actual results:

Couldn't save any files

Expected results:

Detect snap environment correclty.

After setting widget.use-xdg-desktop-portal manually to true, everything works

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
Blocks: snap

This is because by default Firefox will use the portal only if packaged as a flatpak, or if GTK_USE_PORTAL ≠ 0 (see https://hg.mozilla.org/mozilla-central/rev/800142bdea708f819ee11fadcf08f6cf3170eb32).

This is not Debian-specific, it affects the snap everywhere.

Note that GTK_USE_PORTAL isn't correctly honoured in 96.0.3, but it is in 97.0 (currently in the candidate channel, expected to be promoted to stable today).

Also note that while the portal works to open files in Firefox, there are a number of things that don't work correctly:

  • using xdg-open to open an HTML file somewhere in your home directory results in an access denied page
  • saving an HTML document with images and other assets fails at the first attempt, and succeeds when retried, but assets aren't downloaded (bug #1664887)
  • downloading a file (e.g. a .tar.xz archive) from a hyperlink silently fails, even with the "always ask where to save files" preference enabled

So I wouldn't recommend disconnecting the home plug just yet.

Olivier, what should be the expected behavior if we disconnect home ? I can repro the issue, but my current understanding would be that without home we can't really save, is this a wrong assumption?

Flags: needinfo?(olivier)

That's right, I just tested in an Ubuntu 22.04 VM, and if home is disconnected saving files fails. Also, as I pointed out in comment #2, using xdg-open to open an HTML file somewhere in your home directory results in an access denied page.

Flags: needinfo?(olivier)

If disconnecting this is not supposed to be supported and hence it is expected to break stuff, should we just RESOLVED:INVALID this ? Given the root cause was GTK_USE_PORTAL not being honored and this is now fixed.

Flags: needinfo?(olivier)
Summary: [Snap] Detection of Snap Environment failed in Debian → [Snap] Support disconnecting firefox:home

Now widget.use-xdg-desktop-portal.file-picker=1 does not get it to work at all.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(olivier)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.