I use Master PDf editor installed through flathub to edit some PDf files.
When I close it, I can sse by lsof | grep /media/<MYUSER>/<DEVICE> that xdg-document is keeping my file open.
What is xdg-document, why it is keeping the file open and how can I prevent it from doing this?
xdg-document-portal(It gets truncated toxdg-documon my system) and it's part of the XDG portals system that allows sandboxed Flatpak and Snap apps to use privileged Open/Save dialogs to access documents outside the sandbox. (It's also what's responsible for allowing Qt apps to use GTK Open/Save dialogs on GNOME and GTK apps to use KDE Open/Save dialogs on KDE. Basically, when an application requests an open/save dialog and you click OK,xdg-document-portalis what provides controlled access to what you selected.) As for how to stop it, I'm still looking. – ssokolow Jan 03 '22 at 09:16