Hi, the way flatpaks work to make one installation script work for all linux operating systems that have flatpak already installed is to use the same prerequisite runtimes for all operating systems. The script that gramps flatpak uses is at the gramps-project github page flatpak/org.gramps_project.Gramps.yml at main · gramps-project/flatpak · GitHub Flatpaks share the runtimes so they can be regularly updated, which occasionally causes problems for apps that are not regularly maintained or (in the case of many Gramps add-ons) use old prerequisites. Flathub is supposed to reject any script that attempts to rewrite parts of these runtimes like would happen in a normal OS installation.
This use of standard runtimes is also useful for making a weak sandbox available. Many apps, like gramps, have to poke holes in that “sandbox” to make the app useable for regular users. The holes I made (with explaining comments) for Gramps to work are at the finish-args section lines 9-23. They include internet access (without which some add-ons or maps won’t work), full home directory access since 5.1.x has issues with using xdg specs for previously installed media folders (I don’t know where random users decide to install their media and data files inside home), graphics access, and a command to let the flatpak use the system name that normal installations of Gramps use. For more advanced flatpak users who want to tighten their sandboxes, there is Flatseal to manage permissions.
So the explanation for the 8 current runtimes are:
1-3 are graphics related. I tried to remove X11 from the Gramps flatpak and use only Wayland runtimes to reduce the number of runtimes required to download for Gramps, but a flathub maintainer told me to add X11 back in.
4-5 appear to be regional files for whatever country and language you use on your device
6. Gtktheme is icons and stuff for whatever theme flatpak expects Gramps to use
7. is the runtime for Gnome (currently 43). Flatpak has separate runtimes for different desktop environments including Gnome and KDE, along with generic freedesktop runtimes. This is the heart of how one app installation script will work for any linux device that has flatpak installed
8. Gramps compiled with a limited number of add-ons
There are so many optional add-ons for Gramps that to attempt to include prerequisites for them all will cause the following problems:
- the Gramps app flatpak would be a massive pre-compiled download by itself. With the runtimes, it is already large if the runtimes are not already installed by another flatpak app
- different add-ons sometimes work best for different versions of the same prerequisite. This can cause conflicts in a flatpak
- each runtime or Gramps update has the potential to cause the flatpak to stop working. This has happened before. I personally check prerequisite updates to make sure the app does not break. While some people recommend automating prerequisite updates, I do not want to be responsible for breaking an app that some people use a lot. Furthermore, some add-ons will not work with newer prerequisites, so old versions are required in that case.
- including more prerequisites for more add-ons would make the flatpak for Gramps very time consuming. Some prerequisites could be updated if I had the ability for checking each prerequisite repository and then testing/troubleshooting the Gramps flatpak each time I made a change. I do not have that ability at this time.
Many popular add-ons do work on the Gramps flatpak. You are welcome to follow the link earlier to see the prerequisites included in the Gramps flatpak. If an add-on that you want does not work in the Gramps flatpak, you are welcome to submit a feature request. If an add-on seems popular then I am likely to add it when I have time for testing, or you could submit an update at GitHub - gramps-project/flatpak: Manifest and data files required to make a Gramps Flatpak if you already use github and can work a yml file. There is the flathub github also for Gramps, but everything sits at the gramps-project/flatpak for about a week for review first before submission to flathub unless it is an emergency (like to fix a crash caused by a runtime or prerequisite update).
As mentioned, for security reasons flathub will not allow shared runtimes to be modified, and the Gramps flatpak is precompiled and downloaded from flathub. These are the instructions for making your own flatpak from a manifest Building your first Flatpak — Flatpak documentation if you can do that then you are welcome to submit updates to the Gramps project flatpak linked earlier.
Drag and drop to the Gramps clipboard works fine for me, from both the OS file manager and also from the media tab of Gramps itself. However, I intentionally limited access to the linux home directory instead of root access, so if Chrome (based on linux kernel) stores files outside what the flatpak recognizes as the home directory, then install Flatseal from flathub in order to expand access to wherever the media is stored. I confirmed drag-and-drop works just now with the current Gramps 5.1.5 flatpak on Linux Mint 21.1 with the Mate desktop environment.