flathub / org.geany.Geany

https://flathub.org/apps/details/org.geany.Geany
6 stars 6 forks source link

Access to files on gvfs #72

Open MasinAD opened 6 months ago

MasinAD commented 6 months ago

Ubuntu 22.04, latest package versions of everything required.

I cannot access gvfs mounted SSH folders (those mounted by Nautilus → Ctrl+L → ssh://user@server). Using Flatseal I added some settings according to https://docs.flatpak.org/en/latest/sandbox-permissions.html#gvfs-access which allowed loading files. image image

Just adding xdg-run/gvfsd didn't suffice, I had to add xdg-run/gvfs. Saving doesn't work though.

image

TiZ-HugLife commented 6 months ago

Geany does not support gvfs access without gvfs-fuse. I also can't meaningfully reproduce it on my Plasma system, because if I use Dolphin's network browser and open a file through Geany, the document portal forwards the file and all reads/writes to it. I can tell because I see /run/doc/... in the titlebar. But when you use the open and save options within Geany, the native GTK chooser appears instead of the portal-based chooser, because Geany wants to be able to change the encoding when opening a file. Also, the developers don't seem to want to use portals. I wonder if I could talk them into an option to use GtkFileChooserNative; is it a particularly common need to want to change the file encoding on open?

EDIT: Though now that I think about it, when a file is opened via the document portal, the TreeBrowser plugin breaks in a way. It doesn't show you the real directory structure of the folder containing the file you opened; it shows you what's in the document store because there's not currently any portal/sandbox-safe way to do that. This particular usecase has been bikeshedded to hell for years, and if there's ever a real fix, it won't be for at least a couple more years, and it could end up being another API for Geany's developers to be convinced to support.

So if you need proper GVFS support, I would recommend not using Geany.