I have installed a few chat applications through flatpak (teams with Edge and “Whatsapp for Linux”). In both cases I can’t paste images or drag files. I can paste text and I can upload files through the GUI. I imagine this is likely due to a permission that can be set through Flatseal. Anybody can help?
I’m definitely not an expert and there may be a better solution to this! Just sharing what my experience has been.
You can share any image through the GUI because that will open an xdg-desktop-portal that lets you select the file - Teams/Whatsapp doesn’t know what’s on your file system, only the portal does. The portal brings in your selected image and only your selected image into Edge/Whatsapp, therefore maintaining the sandbox.
Dragging and dropping doesn’t go through a portal, so if the sandboxed application doesn’t have access to wherever that image is, it can’t accept it because it doesn’t know about it! It has to have access to this file. As you mentioned this is something that can be solved in Flatseal: for instance, I added the Screenshots folder to my Firefox permissions so I can drag and drop photos from the Screenshots folder. Adding this allows me to drag and drop images from Screenshots (and any other folders in this “Other files” section), but dragging and dropping from anywhere else doesn’t work since Firefox doesn’t know about it.
You could enable all user files if you want to be able to drag images from anywhere, but that breaks the sandbox since the app would then have access to all files in your home.
My guess: It’s likely that the applications’ flatpak permissions don’t allow to access the folder where those files live. The applications’ file picker GUIs work anyway because they use flatpak portals, which automatically grant access to whatever file you pick.
If you want drag and paste to work, consider using flatseal or
flatpak override
to grant access to the folder where you keep your attachable files.test one
- android.permission.ACCESS_NETWORK_STATE
- android.permission.INTERNET