Bug 434917 - kio-fuse randomly named directory makes working with flatpaks difficult
Summary: kio-fuse randomly named directory makes working with flatpaks difficult
Status: RESOLVED NOT A BUG
Alias: None
Product: kiofuse
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: a.saoutkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-25 04:03 UTC by Jason Straight
Modified: 2021-03-25 14:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Straight 2021-03-25 04:03:19 UTC
Accessing remote filesystems with flatpaks is a pain due to the fuse mountpoint being random at every use.

I order to access a remote filesystem with a flatpak program, like brackets, you have to run it like 

    flatpak run --filesystem=xdg-run/kio-fuse-OexuTR io.brackets.Brackets

The fact that kio-fuse-OexuTR is different every time really complicates this.

Why is this necessary? I don't think gvfs does it this way.
Comment 1 Fabian Vogt 2021-03-25 07:37:10 UTC
> Accessing remote filesystems with flatpaks is a pain due to the fuse mountpoint being random at every use.

Why do you pass --filesystem manually instead of using portals?

In any case, there's https://invent.kde.org/system/kio-fuse/-/issues/18 with some more discussion.
Comment 2 Jason Straight 2021-03-25 13:29:27 UTC
(In reply to Fabian Vogt from comment #1)
> Why do you pass --filesystem manually instead of using portals?

I'm unsure how to use portals in this context. I thought that portals in flatpak were accessible via the API's and were something the desktop environment or developer would implement use of.

I don't seem to be able to find any useful information for an end user to use portals to solve this kind of problem.

If you have a source, I'd appreciate a link or two. Thanks.


> In any case, there's https://invent.kde.org/system/kio-fuse/-/issues/18 with
> some more discussion.

Thank you.
Comment 3 Fabian Vogt 2021-03-25 13:32:00 UTC
(In reply to Jason Straight from comment #2)
> (In reply to Fabian Vogt from comment #1)
> > Why do you pass --filesystem manually instead of using portals?
> 
> I'm unsure how to use portals in this context. I thought that portals in
> flatpak were accessible via the API's and were something the desktop
> environment or developer would implement use of.
> 
> I don't seem to be able to find any useful information for an end user to
> use portals to solve this kind of problem.

The API is used to open files from the host file system. In file open dialogs you can navigate to any location and select also files inside kio-fuse mounts.
Comment 4 Jason Straight 2021-03-25 13:39:38 UTC
(In reply to Fabian Vogt from comment #3)
> The API is used to open files from the host file system. In file open
> dialogs you can navigate to any location and select also files inside
> kio-fuse mounts.

Whenever I navigate to the xdg-run folder the kio-fuse-* folder is not present to the file dialog in any non kde program. Maybe my OpenSuSE is missing a required GTK package.
Comment 5 Jason Straight 2021-03-25 14:01:29 UTC
So it appears that portals only work with certain file choosers, and the programs I'm trying to use remotely don't use [the standard GTK one](https://blogs.gnome.org/mclasen/2016/07/08/portals-using-gtk-in-a-flatpak/), I'm guessing.

I was able to access the kio-fuse-* folder from some gnome apps.

So, this will probably remain to be an issue with several apps.
Comment 6 Jason Straight 2021-03-25 14:31:17 UTC
After following this down the rabbit hole, I'm convinced this is something that would be a non-issue if flatpak/gtk worked like it was supposed.

Not a KDE/kiofuse problem.

Thanks for pointing me in that direction.