Bug 405543

Summary: can't open drag-and-dropped files
Product: [Applications] okular Reporter: Mikel Pérez <io>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, bugseforuns, jgrulich, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mikel Pérez 2019-03-17 01:33:03 UTC
SUMMARY
can't open files dnd'd into the window with the flatpak


STEPS TO REPRODUCE
1. drag a file from dolphin into okular

OBSERVED RESULT
it can't find the file (because it's sandboxed)

EXPECTED RESULT
being able to open the file

SOFTWARE/OS VERSIONS
Linux: Fedora 29 
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.55.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION
opening from File->Open does work (uses a portal)
Comment 1 Albert Astals Cid 2019-03-17 20:39:22 UTC
FWIW i don't think this is actually fixable given how sandboxing works.

At this point the best solution would probably ignoring the drop if sandboxed.

Adding Jan, he has more experience with flatpak and maybe has an idea on how to bypass sandboxing here.
Comment 2 Nate Graham 2019-03-17 23:43:53 UTC
Correct, AFAIK this is unfortunately not possible due to Flatpak limitations. :(

https://github.com/flatpak/xdg-desktop-portal/issues/99
Comment 3 Mikel Pérez 2019-03-19 00:51:01 UTC
so, what I got from that, ending with https://github.com/flatpak/flatpak/pull/2065, is that it had to be implemented by the toolkit, GTK in their case, he implemented something in gtk but he finally says he's going with a portal instead and the repo he links to says nothing about it.

am gonna ask there but hopefully anyone (Jan) already knows how to handle this
Comment 4 Albert Astals Cid 2020-02-27 15:10:48 UTC
it works using okular from flathub now