flathub / org.geany.Geany

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

Files always open in new windows #6

Closed TiZ-HugLife closed 4 years ago

TiZ-HugLife commented 5 years ago

Even though Geany is a tabbed text editor that fancies itself a lightweight IDE, every time I open a file from my file manager, it comes up in an entirely new window. It seems the behavior persists even if you try to do it from the command line.

Geany creates a socket by default within $XDG_CONFIG_HOME/geany that it uses to know when it needs to use an existing window. It seems that socket creation is broken in this version; it creates a link to a file in /tmp that does not exist, neither inside nor outside the sandbox. Which tells me it's failing to make the real socket in its own /tmp. It seems to try to do that even if you use the --socket-file option, which I can't help but feel defeats the purpose.

If you override it to give it access to /tmp, this starts to work properly. But it's really puzzling that it can't make files in its own sandbox /tmp.

EDIT: I'm on Xubuntu 18.04.2, which ships Flatpak 1.0.8. I updated to 1.4.2 via PPA and the behavior persists.

Alexmitter commented 4 years ago

Yes, it seems flatpak override org.geany.Geany --filesystem=/tmp does the trick so far. But that is an issue as --filesystem=host that is geany's default setting should allow access to /tmp.

TiZ-HugLife commented 4 years ago

Looks like the /tmp override doesn't even work anymore.

TiZ-HugLife commented 4 years ago

Sorry to double-post, but the new fix is flatpak override org.geany.Geany --filesystem=xdg-run/geany:create.

sat3ll commented 4 years ago

Sorry to double-post, but the new fix is flatpak override org.geany.Geany --filesystem=xdg-run/geany:create.

Nice! Do you want to create a PR to apply this fix? Or do you want me to apply your fix?

TiZ-HugLife commented 4 years ago

You can take care of it if it would be easier. :)