Closed Bug 1675312 Opened 4 years ago Closed 4 years ago

[Flatpak] XDG file chooser portal not working in Wayland

Categories

(Core :: Widget: Gtk, defect)

Firefox 82
defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: theevilskeleton, Assigned: jhorak)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

Steps to reproduce:

I opened the Firefox flatpak in a Wayland window (with --env=MOZ_ENABLE_WAYLAND=1 --socket=wayland options enabled).

Actual results:

The XDG file chooser portal doesn't work. I only have access to the Downloads folder, since it's the only directory enabled in the Firefox flatpak.

Expected results:

The file picker should work and should allow me to see everything my filesystem has.

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

Could not install Firefox Flatpack on my Ubuntu 20.04 machine, assigning this to the Widget: Gtk component so that someone with more knowledge in this area can take a look.

I think this is intended behavior, what do you think Jan?

Flags: needinfo?(jhorak)

Looks like we're wrongly detecting flatpak environment we should use https://gitlab.gnome.org/GNOME/gtk/-/blob/4300a5c609306ce77cbc8a3580c19201dccd8d13/gdk/gdk.c#L472 - filename changed from flatpak-info to the .flatpak-info

Assignee: nobody → jhorak
Flags: needinfo?(jhorak)

(In reply to Martin Stránský [:stransky] from comment #2)

I think this is intended behavior, what do you think Jan?

No it is not intended. It is supposed to let the user pick contents from any directories from the XDG file portals, despite only being limited to xdg-downloads:rw. This works when opening Firefox in an X11 window but not when opening Firefox in a Wayland window.

We're wrongly detecting that we are in the flatpak environment Setting widget.use-xdg-desktop-portal (as a workaround) should fix it for now. I'll attach the patch in a few.

(In reply to Jan Horak [:jhorak] from comment #5)

We're wrongly detecting that we are in the flatpak environment Setting widget.use-xdg-desktop-portal (as a workaround) should fix it for now. I'll attach the patch in a few.

Can you show me how I can do it? I will appreciate it.

Go to about:config page, look for widget.use-xdg-desktop-portal value and set it to true.

(In reply to Jan Horak [:jhorak] from comment #7)

Go to about:config page, look for widget.use-xdg-desktop-portal value and set it to true.

Looks like it worked. Thank you!

Do I close this issue or do I keep it opened?

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch

Running the FF85 beta as a Flatpak on Fedora (33) Silverblue, I'm unable to get application links to open (e.g. Zoom)

Go to about:config page, look for widget.use-xdg-desktop-portal value and set it to true.

This doesn't seem to change the behavior

(In reply to kxra from comment #12)

Running the FF85 beta as a Flatpak on Fedora (33) Silverblue, I'm unable to get application links to open (e.g. Zoom)

Go to about:config page, look for widget.use-xdg-desktop-portal value and set it to true.

This doesn't seem to change the behavior

We're sorry, but because of the bug 1669282 the application links has been disabled in the flatpak because there's no workaround for this problem.

(In reply to kxra from comment #12)

Running the FF85 beta as a Flatpak on Fedora (33) Silverblue, I'm unable to get application links to open (e.g. Zoom)

Go to about:config page, look for widget.use-xdg-desktop-portal value and set it to true.

This doesn't seem to change the behavior

The problem lies with the update process sometimes.
there are user units in systemd called:

  • xdg-desktop-portal
  • xdg-document-portal
  • xdg-desktop-portal-gtk
  • xdg-permission-store

Reload those via systemctl --user daemon-reload

this fixes the problem.

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

Attachment

General

Created:
Updated:
Size: