Skip to content
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

xdg-open (OpenURI portal) is leaving files open #509

Closed
sophie-h opened this issue Jul 7, 2020 · 0 comments · Fixed by #515
Closed

xdg-open (OpenURI portal) is leaving files open #509

sophie-h opened this issue Jul 7, 2020 · 0 comments · Fixed by #515

Comments

@sophie-h
Copy link
Contributor

sophie-h commented Jul 7, 2020

Minimal example using flatpak-builder --run for the call inside flatpak

flatpak $ xdg-open ~/test/dir
host $ lsof -f +D ~/test/
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
xdg-deskt 4881 sophie   12u   DIR  253,1     4096 15082214 /home/sophie/test/dir

This also happens using glibs g_app_info_launch_default_for_uri() in a program started via flatpak run. The path is still open after exiting the flatpak.

I am using fusermount inside the flatpak and the showing the directory to the user via the OpenURI portal. However, I can't umount the fuse mount when shutting the program down ("Device or resource busy.") I would also be grateful if there is an idea for a workaround while this problem with the portal exists. Would it be possible to bypass the sandbox and run something like xdg-open on the host?

sophie-h added a commit to sophie-h/xdg-desktop-portal that referenced this issue Jul 9, 2020
Didn't managed to get portals to work with my own build, so this is untested.

Not sure if `xdp_impl_app_chooser_call_choose_application()` uses the fd since I have no idea where is function is defined.

Closes flatpak#509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant