Open file with do_open() without large file permission on Flatpak?

Hi, my app supports opening a file with a double-click on Nautilus (or more generally a file manager app), and I have a problem: the file given to do_open() callback is not directly accessible without large flatpak file permission. Would someone know how to have access to the given file without using large flatpak permission like ```filesystem=host``` ?

Thank you in advance!

The file should be accessible in your app without any permissions if everything is set up correctly. Does the Exec line in your .desktop file contain %U at the end? Something like:

Exec=my-app %U
2 Likes

I have that actually:

Exec=kairos %f

Hm, well then as long as the app also has the flags set to Gio.ApplicationFlags.HANDLES_OPEN it should work fine from something like Files.

Note that it doesn’t necessarily mean it works from the CLI.

With my old desktop file, it didn’t work. But with just your edit, it works. I already had the app flag that you told me. Thank you for your responses!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.