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.
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
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
> 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
> 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
> 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