[GNC-dev] flatpak environment.local

Chris Good goodchris96 at gmail.com
Sun Apr 25 21:48:56 EDT 2021

Hi Frank,

Your strace suggestion was successful thanks.
I am using the flathub stable GnuCash flatpak.

1. strace showed both environmentand & environment.local should be in /app/etc/gnucash to be read by GnuCash sandbox.
Investigation shows that this comes from the host file system /var/lib/flatpak/app/org.gnucash.GnuCash/current/active/files/etc/gnucash.
Sandbox /app/etc is HARD linked to host /var/lib/flatpak/app/org.gnucash.GnuCash/current/active/files/etc

This is the expected location for a flatpak that is for ALL users, but I thought  I installed it just for my user.
It turns out that the installation instructions in https://wiki.gnucash.org/wiki/Flatpak#Installation are wrong, at least for Ubuntu 20.04 flatpak 1.65.
Our wiki says:
	# Install GnuCash ...
	## for all users
	sudo flatpak install flathub org.gnucash.GnuCash
	## or only you
	flatpak install flathub org.gnucash.GnuCash

but the Ubuntu man page says (my words):
	## for all users
	flatpak install --system flathub org.gnucash.GnuCash
	## or only you:
	flatpak install --user flathub org.gnucash.GnuCash
And, although the man page doesn't say it, --system is the default and does NOT need sudo,
so my flatpak installed in the system location (/var/lib/flatpak)
rather than the user location (~/.local/share/flatpak).

Can some-one please let me know if the GnuCash wiki is outdated, or just wrong, or just wrong for Ubuntu so I can update it?

2. I just created an environment.local file in
from outside the sandbox, and after the sandbox is started, it is able to access 
I suspect that may go missing after a flatpak update - Is there a better way?

3. Even though the GC sandbox read environment.local setting LANG=en_GB and LANGUAGE={LANG},
and I checked en_GB is available in my flatpak GnuCash shell the trace file still shows:
	Effective locale set to en_AU.UTF-8
Perhaps this message is misleading? I wonder how to check what is actually being used?

As changing the LANG is probably a major reason for using environment.local,
shall I create a bug to record this problem?

Chris Good

-----Original Message-----
From: Frank H. Ellenberger <frank.h.ellenberger at gmail.com> 
Sent: Sunday, 25 April 2021 1:09 AM
To: Chris Good <goodchris96 at gmail.com>; gnucash-devel at gnucash.org
Subject: Re: [GNC-dev] flatpak environment.local

Hi Chris,

can you use strace to find the used config?
BTW you did not tell, which flatpak you are using:
Flathub, Nightly, self built; version, …


Am 23.04.21 um 04:54 schrieb Chris Good:
> Hi Frank,
> Thanks for the suggestion.
> ~/.local/share/flatpak/app does not exist in my system (Ubuntu 20.04 flatpak 1.65).
> Not sure if relevant, but I installed the GnuCash flatpak for only my user - i.e. NOT using sudo.
> I'm not sure setting LANG=en_GB in environment.local was a good test of if environment.local is being used.
> I did the same in Windows and the trace file message still shows the effective local has not been altered.
> I did check en_GB is available in my flatpak GnuCash shell.
> I'm happy to update the wiki when I know where environment.local should be or if it is not used.
> BTW jralls in https://github.com/flathub/org.gnucash.GnuCash/issues/24#issuecomment-651967321 says:
>   I've patched guile to not do the timestamp check and just use any .go files it finds. Has that helped?
> And another user says it fixed the issue of .scm files being recompiled on every launch.
> But I still needed to touch all the .go files in Ubuntu (and derivates as the flatpak wiki says). Any idea why jralls' fix doesn't help in Ubuntu?
> Regards,
> Chris Good
> -----Original Message-----
> From: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
> Sent: Thursday, 22 April 2021 11:49 PM
> To: Chris Good <goodchris96 at gmail.com>; gnucash-devel at gnucash.org
> Subject: Re: [GNC-dev] flatpak environment.local
> Hi Chris,
> Flatpak is at first a sandbox.
> I suspect you are searching for
> ~/.local/share/flatpak/app/org.gnucash.GnuCash/current/active/files/et
> c/gnucash/environment
> Can you after testing update
> https://wiki.gnucash.org/wiki/Configuration_Locations and add a link 
> in https://wiki.gnucash.org/wiki/Flatpak
> Regards
> Frank
> Am 22.04.21 um 08:38 schrieb Chris Good:
>> Hi,
>> (disclosure: I'm a flatpak newbie)
>> I'm trying to update my BackupGnuCash utility
>> (https://github.com/goodvibes2/BackupGnuCashLinux) to cater for Flatpak.
>> I'm trying to find out if environment.local needs to be backed up, 
>> and if so, where it should be.
>> I created an environment.local containing:
>> # 22/04/2021 CRG Set LANG to en_GB to test where environment.local 
>> should be in flatpak LANG=en_GB LANGUAGE={LANG} And put it in
>> /etc/gnucash
>> and
>> /var/lib/flatpak/app/org.gnucash.GnuCash/current/active/files/etc/gnu
>> c
>> ash
>> But when GnuCash is restarted, the trace file still shows:
>> INFO <gnc.gui> [Gnucash::CoreApp::start] Effective locale set to 
>> en_AU.UTF-8.
>> Can flatpak GnuCash read an environment.local file and if so, where 
>> should it be?
>> Regards,
>> Chris Good

More information about the gnucash-devel mailing list