[GNC-dev] About the "$HOME/.local" installation prefix

David Cousens davidcousens at bigpond.com
Fri May 3 02:24:53 EDT 2019

John, Geert et al

I have not been able to find any references on user directory organization
apart from the XDG

There was one comment in this link
(https://itsfoss.com/install-software-from-source-code/) which suggests that
software installed in /opt from source expects to find its resources in
directories relative to a package parent directory in /opt. and that this is
why simlinks are used from/usr/bin or /usr/local/bin to the executable in
/opt/<package> where the application stores its resources relative to
/opt/<package>. This seems to be how LibreOffice is installed on Linux Mint
for example.

I haven't had gnucash installed in /opt for quite a while now (or
$HOME/.local) but I remember noticing that the resources for/opt were under
a package directory. 

If the same situation  (i.e. the ability to find program resources in a
relative directory structure) applies for the installation in a user
directory rather than installing directly under $HOME/.local  we could
recommend installing to a subdirectory of this location specifically for
program installations and in turn create a <package> directory under that
for gnucash which would contain the executable and its resources. This would
then facilitate easy removal of the package from a users home directory by
simply deleting the package level directory to simplify things for
inexperienced users.

The above seems to be the case as I install development builds to an install
subdirectory which is a subdirectory of a main directory which contains my
gnucash sources and separate build directories for make and ninja etc and I
have never detected that starting gnucash from the   .../install/bin/gnucash
executable has accessed resouces for production builds which I have
installed in /usr/local. Can't be definitive about that but it has included
changes to gnucash library files which appeared in the executable which
wouldn't be the case if it was picking up libraries from the system

I guess this was the munge of the file locations that occurs with cmake for
/opt and $HOME/.local type installations you referred to in an earlier post
compared with installation in a system location. 

I.e. we recommend using cmake commands as follows for inexperienced or users
who don't have admin privileges rather than simply installing directly under
$HOME/.local  which already has a gnucash directory for GnuCash user

cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local/programs/gnucash <relative or
absolute path to sources>

If you think this is a better idea (or there is another more general
alternative  I can update the Wiki build instructions to reflect this. The
user could then create an alias in the bashrc file to access the executable
and/or add it to their launcher etc.

David Cousens

David Cousens
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html

More information about the gnucash-devel mailing list