# Opening files with portal not working

**URL:** https://discourse.nixos.org/t/opening-files-with-portal-not-working/81487
**Category:** Help
**Created:** [November 28, 2026, 9:39am UTC](https://discourse.nixos.org/t/opening-files-with-portal-not-working/81487 "2026-11-28T09:39:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![StillerHarpo](https://discourse.nixos.org/user_avatar/discourse.nixos.org/stillerharpo/32/3655_2.png) [@StillerHarpo](https://discourse.nixos.org/u/StillerHarpo)
#### Post date: [November 28, 2026, 9:39am UTC](https://discourse.nixos.org/t/opening-files-with-portal-not-working/81487/1 "2026-11-28T09:39:44Z")

</div>

I’m trying to restrict my desktop apps with [GitHub - samiser/waypak: sandbox apps on nixos with wayland's security-context-v1 and bwrap · GitHub](https://github.com/samiser/waypak).

If I try to open a file with such an restricted app (e.g. pinta) I can select the file, but opening won’t work. I got the error

```auto
GLib.GException: Error when getting information for file “<PATH>”: No such file or directory
   at Gio.FileHelper.QueryInfo(String attributes, FileQueryInfoFlags flags, Cancellable cancellable)
   at Pinta.Core.GioExtensions.GetDisplayName(File file) in /build/source/Pinta.Core/Extensions/GioExtensions.cs:line 48
   at Pinta.Core.WorkspaceManager.OpenFile(File file, Window parent) in /build/source/Pinta.Core/Managers/WorkspaceManager.cs:line 302

```

My assumption is that it would go over the `xdg-document-portal` and the apparmor and waypak restrictions would therefor not apply.

The portals are running

```sh
> systemctl --user list-units | rg -i portal
 xdg-desktop-portal-gtk.service loaded active running Portal service (GTK/GNOME implementation)
 xdg-desktop-portal-wlr.service loaded active running Portal service (wlroots implementation)
 xdg-desktop-portal.service loaded active running Portal service
 xdg-document-portal.service loaded active running flatpak document portal service

```

verbose logging of `xdg-document-portal`

```auto
> systemctl --user cat xdg-document-portal
> /nix/store/hq1c8l5fl0xbr1ak1pac5i2ax6914121-xdg-desktop-portal-1.20.4/libexec/xdg-document-portal -rv
/nix/store/s5dbsqaas1bl18xd6p8d8kp6qaqimz0a-fuse-3.17.4-bin/bin/fusermount3: entry for /run/user/1000/doc not found in /etc/mtab

```

The fuse mount does exist

```auto
> mount
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

```

My current attempt is here [https://gitlab.com/StillerHarpo/nixosconfiguration/-/commit/a7b0b9dee43ec7c962d5b099c996c93f83c36029](https://gitlab.com/StillerHarpo/nixosconfiguration/-/commit/a7b0b9dee43ec7c962d5b099c996c93f83c36029)

---

<div class="post-metadata">

### Author: ![StillerHarpo](https://discourse.nixos.org/user_avatar/discourse.nixos.org/stillerharpo/32/3655_2.png) [@StillerHarpo](https://discourse.nixos.org/u/StillerHarpo)
#### Post date: [December 1, 2026, 2:17pm UTC](https://discourse.nixos.org/t/opening-files-with-portal-not-working/81487/2 "2026-12-01T14:17:57Z")

</div>

The problem was that I set `talk = ["org.freedesktop.portal.*"]` which includes the desktop portal, but didn’t activate it in `waypak` ([https://github.com/samiser/waypak/blob/43e89a7cd016b4764ec4dc51b19b632d9dc161e8/lib/launcher.nix#L11](https://github.com/samiser/waypak/blob/43e89a7cd016b4764ec4dc51b19b632d9dc161e8/lib/launcher.nix#L11)). Setting it to `talk = ["org.freedesktop.portal.Desktop"]` worked.
