I have been playing with the gnucash flatpak package in the last few days.

And I can add some information regarding the file open issues (though not 
everything is clear yet).

For starters I can confirm that by default USB sticks and network shares are 
not accessible. I have fouind this is due to flatpak's security policy which 
states: by default allow as little access as possible. This clearly excludes 
mounted media and network shares.

This limitation can be relaxed though with the "flatpak override" command. In 
particular by running
  flatpak override org.gnucash.GnuCash --filesystem=<path-to-allow>

<path-to-allow> can be any filesystem path you wish to access from within 
gnucash. For example on Fedora usb sticks are mounted under /run/media so I 
have run

  flatpak override org.gnucash.GnuCash --filesystem=/run/media

And now USB sticks appear in the gnucash File->Open dialog.

It appears on Ubuntu and derivatives however usb sticks are mounted under 
/media so on those platforms the command would become

  flatpak override org.gnucash.GnuCash --filesystem=/media

The same can be done for any network shares that are not mounted under your 
home directory. For example if you have a mounted network share under /mynet
you can allow access by running 

  flatpak override org.gnucash.GnuCash --filesystem=/mynet

One caveat:
I had some permission issues on my system, which I don't know were due to how 
my system is set up or a bug in flatpak. As my flatpaks are installed system 
wide, the flatpak information is stored in /var/lib/flatpak and only the root 
user has write access there.

So I had to prefix each command with 'sudo'. With this the commands ran fine, 
but I still had issues because the file permissions of the generated override 
file and its parent directory, "overrides", didn't grant access to ordinary 
users.

I fixed this by running following two commands:
sudo chmod o=rx /var/lib/flatpak/overrides
sudo chmod o+r /var/lib/flatpak/overrides/org.gnucash.GnuCash

You may or may not need to do something similar on your system. YMMV.

Hopefully this will make flatpak a viable alternative for more users that want 
to try out gnucash 3 while it's not yet available on their preferred platform.

Regards,

Geert

Op vrijdag 27 juli 2018 01:06:49 CEST schreef DaveC49:
> Adrien, David,
> 
> The same issue occurs in Linux Mint 19(Tara) which is Ubuntu 18.04 based.
> Nemo (file explorer)  can see the mounted USB stick and access it directly
> or via the /media/<user>/ mount point for the device but the Gnucash file
> open dialog neither sees the USB stick or /media/<user>/ mount point when
> you click on other locations. It only lists a restricted set of the
> directories under / by comparison with what can be accessed from Nemo. Not
> being able to access the /media mount points would qualify as a bug.
> 
>  On LM19 /media has 755 permissions, the user directory under it has 750 and
> the mounted USB stick has 755 permissions.
> 
> The file->Open dialog in LibreOffice which looks to be a similar GTK3 dialog
> does display the USB stick in the sidebar and it sees all the directories
> under / as well as any networked locations which don't show up in GnuCash
> either.
> 
> if no-one has already filked a bug i will put one in later today.
> 
> David Cousens



_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to