-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File Picker portal brings up dialog, but the selected file is empty #1076
Comments
You do not use a sandbox that is supported by xdp (flatapk or snap) and therefore xdp assumes your program is allowed to access this path because it assumes it is an "normal", unsandboxed host program. Very unfortunate situation right now that xdp has only support for these two and not for a generic one (via some kind of plugin or api mechanism). So if you use firejail/bubblejail/plain bubblewrap/crablock you can not benefit from the documents portal (and other portals have a "is allowed anyway" logic too). There's a hacky workaround by pretending to be a flatpak. You can place a minimal |
Still doesn't work on my end |
Strangely enough, 2 things seem to happen when trying to workaround this issue:
I wonder if it's possible to patch xdh to always return the document path regardless |
More precisely, there are two processes if you run with |
Even with |
Idk in for which pid xdp search but it could as be that the portal looks at the pid of the dbus-proxy. |
So if I manually copy the file to Interesting workaround Sidenote: if I copy it to my root directory as |
I figured out the issue, it was this: --ro-bind "$APP_FOLDER/bus" "$XDG_RUNTIME_DIR/bus" I have no idea why that prevented the root folder of proc from representing the sandboxed environment, but I'll close this now |
If you're using Flatpak puts More generally, if you are reinventing Flatpak, it will be necessary to solve many of the same problems that Flatpak has done. |
Thanks for the info! I'm aiming to sandbox native programs while taking advantage of portals and whatnot (since some native programs don't have Flatpak versions) |
When attempting to use portals directly (i.e. outside of Flatpak), I get the following issue:
2023-08-20.14-42-08.mp4
Where the file picker portal brings up the file picker dialog, but when selecting a file, services will complain it's "empty". As part of debugging, I checked
$XDG_RUNTIME_DIR/doc
and found no folder for the program I'm sandboxing.Here's the script I'm using to run the portals and sandbox:
The text was updated successfully, but these errors were encountered: