Bugzilla – Bug 1215641
XDG Portal 0.18.0 requires DEs/WMs to have Portals Configuration
Last modified: 2023-10-31 10:01:26 UTC
Snapshot 20230921 has a bug where a user cannot open a filechooser/filepicker. A snippet of the log through `journalctl -f` is shown below: ``` Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Server is missing xdg_foreign support Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Failed to export handle, could not set transient for Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.FileChooser” on object at path /org/freedesktop/portal/desktop ``` I have to rollback for now to a previous snapshot.
(In reply to Soc Virnyl Estela from comment #0) > Snapshot 20230921 has a bug where a user cannot open a > filechooser/filepicker. A snippet of the log through `journalctl -f` is > shown below: > > ``` > Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Server is missing > xdg_foreign support > Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Failed to export handle, > could not set transient for > Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Can't open portal file > chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such > interface “org.freedesktop.portal.FileChooser” on object at path > /org/freedesktop/portal/desktop > ``` > > I have to rollback for now to a previous snapshot. I also get a PermissionDenied error to `/run/user/1000/doc` when restartig `/usr/libexec/xdg-desktop-portal -r` I will provide logs later. Need to get back to a previous snapshot for now
(In reply to Soc Virnyl Estela from comment #1) > (In reply to Soc Virnyl Estela from comment #0) > > Snapshot 20230921 has a bug where a user cannot open a > > filechooser/filepicker. A snippet of the log through `journalctl -f` is > > shown below: > > > > ``` > > Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Server is missing > > xdg_foreign support > > Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Failed to export handle, > > could not set transient for > > Sep 24 12:29:37 sentient-slate firefox-bin[3253]: Can't open portal file > > chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such > > interface “org.freedesktop.portal.FileChooser” on object at path > > /org/freedesktop/portal/desktop > > ``` > > > > I have to rollback for now to a previous snapshot. > > I also get a PermissionDenied error to `/run/user/1000/doc` when restartig > `/usr/libexec/xdg-desktop-portal -r` > > I will provide logs later. Need to get back to a previous snapshot for now I am not sure why I am getting this error when trying to open a file picker ``` systemctl --user status xdg-document-portal.service × xdg-document-portal.service - flatpak document portal service Loaded: loaded (/usr/lib/systemd/user/xdg-document-portal.service; static) Active: failed (Result: exit-code) since Mon 2023-09-25 06:09:53 PST; 1s ago Duration: 3ms Process: 21984 ExecStart=/usr/libexec/xdg-document-portal (code=exited, status=6) Main PID: 21984 (code=exited, status=6) CPU: 9ms Sep 25 06:09:53 sentient-slate systemd[9078]: Starting flatpak document portal service... Sep 25 06:09:53 sentient-slate systemd[9078]: Started flatpak document portal service. Sep 25 06:09:53 sentient-slate xdg-document-portal[21992]: fusermount3: failed to access mountpoint /run/user/1000/doc: Permission denied Sep 25 06:09:53 sentient-slate xdg-document-portal[21984]: error: fuse init failed: Can't mount path /run/user/1000/doc Sep 25 06:09:53 sentient-slate systemd[9078]: xdg-document-portal.service: Main process exited, code=exited, status=6/NOTCONFIGURED Sep 25 06:09:53 sentient-slate systemd[9078]: xdg-document-portal.service: Failed with result 'exit-code'. ```
So it's XDG Desktop Portal. Old version 0.16.0 still uses libfuse2 (unmaintained) Latest version 0.18.0 now uses libfuse3. So I guess it has something to do with the permission denied error?
(In reply to Soc Virnyl Estela from comment #3) > So it's XDG Desktop Portal. > > Old version 0.16.0 still uses libfuse2 (unmaintained) > > Latest version 0.18.0 now uses libfuse3. So I guess it has something to do > with the permission denied error? I might be wrong but I am going to look into this. Seems I was - https://github.com/flatpak/xdg-desktop-portal/pull/634 So I wonder what causes those permission denied errors
Found a solution. It seems 0.18.0 requires manual configuration and expects desktop environments to have their own portals.conf as explained in https://github.com/flatpak/xdg-desktop-portal/issues/1077#issuecomment-1688007044 The workaround is to add a custom config like https://github.com/flatpak/xdg-desktop-portal/issues/1077#issuecomment-1715896552 I use river and tested that. It worked.
This is an autogenerated message for OBS integration: This bug (1215641) was mentioned in https://build.opensuse.org/request/show/1113341 Factory / river
With the new configuration requirements, desktop environments and packagers are expected to have in their best guesses, also add a portals.conf corresponding to that environment.
I have prepared a patched package [0] for Xfce with the drop-in file however it does not seem to work. [0]https://build.opensuse.org/package/show/home:mauriziogalli:branches:X11:xfce/xfce4-session flatpak applications still get errors such as `Args: No such interface “org.freedesktop.portal.FileChooser”`
I'm reopening this just so that can keep the tracker around till it's properly resolved
running this command at startup fixes the issue on Xfce: systemctl --user import-environment XDG_CURRENT_DESKTOP && dbus-update-activation-environment --systemd XDG_CURRENT_DESKTOP && systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service
It's right to keep this open. So I will update this. Are there any desktop environments affected by this? Checklist of resolved DEs/WMs: - [X] RiverWM - [X] SwayWM - [X] Hyprland - [ ] GNOME - [ ] XFCE - [ ] KDE Plasma Please add more that you might find. XDP 0.18.x requires DEs/WMs to provide their own portals.conf. Thanks!
(In reply to Soc Virnyl Estela from comment #11) > It's right to keep this open. So I will update this. Are there any desktop > environments affected by this? > Xfce is still affected, I have created the drop-in conf file but there is more that is needed to make it work as described in comment #10. I'm looking for a cleaner fix/workaround than having a bash script executing that command.
(In reply to Soc Virnyl Estela from comment #11) > It's right to keep this open. So I will update this. Are there any desktop > environments affected by this? > > Checklist of resolved DEs/WMs: > - [X] RiverWM > - [X] SwayWM > - [X] Hyprland > - [ ] GNOME > - [ ] XFCE > - [ ] KDE Plasma > > Please add more that you might find. XDP 0.18.x requires DEs/WMs to provide > their own portals.conf. > > Thanks! Plasma ships /usr/share/xdg-desktop-portal/kde-portals.conf since 5.27.8.
(In reply to Fabian Vogt from comment #13) > (In reply to Soc Virnyl Estela from comment #11) > > It's right to keep this open. So I will update this. Are there any desktop > > environments affected by this? > > > > Checklist of resolved DEs/WMs: > > - [X] RiverWM > > - [X] SwayWM > > - [X] Hyprland > > - [ ] GNOME > > - [ ] XFCE > > - [X] KDE Plasma > > > > Please add more that you might find. XDP 0.18.x requires DEs/WMs to provide > > their own portals.conf. > > > > Thanks! > > Plasma ships /usr/share/xdg-desktop-portal/kde-portals.conf since 5.27.8. Cool
I will help out with XFCE. I think I have an idea but not that sure.
(In reply to Soc Virnyl Estela from comment #15) > I will help out with XFCE. I think I have an idea but not that sure. Thanks, but I think I found a way around the issue: https://build.opensuse.org/request/show/1120482
Xfce is "fixed" too now although the solution implemented is not very elegant. If a better solution comes along then we will address it. and Also to my knowledge GNOME is fine so we can close this bug for now and reopen if needed. Checklist of resolved DEs/WMs: - [X] RiverWM - [X] SwayWM - [X] Hyprland - [X] GNOME - [X] XFCE - [X] KDE Plasma
I will add something in openSUSE wiki regarding portals. the list is *my list* that i made since i have experience using those environments. some users may want to use another portal impl other than the intended recommends e.g. xdp-wlr vs xdp-hyprland. anyway thanks for resolving this. :)