3

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?

robertspierre
  • 1,012
  • 1
  • 8
  • 24
  • 1
    It's probably shortening `xdg-document-portal` (It gets truncated to `xdg-docum` on 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-portal` is 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
  • I don't know what version you're running but, according to [this comment](https://github.com/flatpak/flatpak/issues/4303#issuecomment-858913565), it's supposed to stop automatically when you close the relevant application but the versions of xdg-document-portal distributed with Ubuntu 20.04 (1.6.0) and available for it through the Flatpak PPA (1.7.2) have a bug that can manifest as you describe (fixed in 1.8.1). – ssokolow Jan 03 '22 at 09:21

0 Answers0