flatpak-documents - Linux


flatpak-documents is a utility designed to manage documents on Linux systems that leverage the Flatpak package management framework. It enables users to open, edit, and delete documents associated with a specific Flatpak application.


flatpak-documents [options] <flatpak-id> <file-path>


  • -o, –open: Open the specified file in the associated Flatpak application.
  • -e, –edit: Edit the specified file in the associated Flatpak application.
  • -d, –delete: Delete the specified file from within the Flatpak application.
  • -h, –help: Display usage information and exit.


  • Open a PDF file in the Evince PDF viewer within the com.github.johnfactotum.Evince Flatpak:

    flatpak-documents com.github.johnfactotum.Evince /path/to/file.pdf
  • Edit a text file in the Gedit text editor within the org.gnome.Gedit Flatpak:

    flatpak-documents org.gnome.Gedit /path/to/file.txt
  • Delete an image file from within the Gwenview image viewer within the org.gnome.Gwenview Flatpak:

    flatpak-documents org.gnome.Gwenview /path/to/image.jpg

Common Issues

  • Ensure that the Flatpak application associated with the file is installed and running.
  • Make sure the file path provided is valid and accessible by the Flatpak application.
  • If the command doesn’t respond, check if the Flatpak application is responding to D-Bus requests.


flatpak-documents can be integrated with other commands to automate tasks. For instance, combine it with find to delete multiple files in a directory:

find /path/to/directory -type f -name "*.txt" | xargs flatpak-documents com.github.johnfactotum.Evince --delete

Related Commands

  • flatpak: The primary package management tool for Flatpak applications.
  • flatpak install: To install Flatpak applications.
  • flatpak run: To run Flatpak applications from the terminal.