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?

  • Megaf
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I’m actually having issues pasting images on WhatsApp web on regular Firefox. That might be a thing with WhatsApp itself.

    About the permissions, if you are pasting an image that is in your computer, then the app needs to be able to read the file from the computer, aka read the file from disk.

  • carnha@lemmy.one
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    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.

  • fruitywelsh
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I can past images via ctl+v in webcord’s default settings, but I can’t right-click paste.

  • ono@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    My guess: It’s likely that the missing permissions are to 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.

  • LHLaurini@lemmy.pt
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’m not sure about pasting images, but I believe that to drag and drop images, you need filesystem permission to the directory.

    (I think that’s the case because I noticed I can only drag & drop images to Chrome if they’re in the Downloads folder)