[GNC-dev] Single User Installation location on Linux
Frank H. Ellenberger
frank.h.ellenberger at gmail.com
Thu Mar 5 01:44:35 EST 2020
Hi David,
some historical background:
In Gnucash 2.x we followed the FHS
http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s08.html
Note, that "Home Directory Specifications and Conventions" is new in
version 3, released March 19, 2015.
In Gnucash 3.x we obey the XDG Base Directory Specification
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
"Environment variables" shows the defaults $HOME/.local/share
and $HOME/.config.
I would not use $HOME/.local as PREFIX because, as you show,
$HOME/.local/share would be cluttered by 2 different types of data,
which are output of
1. make install
2. running gnucash
If you forgot to run 'make uninstall' before each 'make && make install'
you can not remove $HOME/.local without loosing the "memory" of gnucash
and other XDG conform programs.
My approach:
I would use $HOME/test as prefix and
a) insert $HOME/test/bin into PATH or
b) create in $HOME/bin a shell script, whith e.g.:
$HOME/test/bin/gnucash --nofile
I would not use a hidden directory without a specific reason.
Regards
Frank
Am 05.03.20 um 02:47 schrieb David Cousens:
> The wiki Building on Linux currently recommends doing a single user local
> installation to $HOME/.local.
>
> Frank Ellenberger pointed out to me in a thread
> (http://gnucash.1415818.n4.nabble.com/GNC-How-to-install-GnuCash-from-Source-for-Linux-tt4716225.html)
> on the User forum that this results in $HOME/.local/share containing both
> program and user configuration data in $HOME/.local/share/gnucash.
>
> The data seems to happily coexist, i.e. no folders or files from the program
> and configuration data seem to have the same name and make uninstall appears
> to leave program data in that location after uninstalling. The following is
> a list of the accounts in the location after an install to $HOME/.local. The
> files/folders marked with a * following them are the ones which were present
> in that location prior to installing GnuCash in $HOME/.local (my user
> config data from my normal installation running from in /usr/local). After
> an uninstall, the files seem to be deleted but the folders are not generally
> deleted so an uninstall of the program is not complete.
>
> $HOME/.local/share/gnucash*/accounts
> /books *
> /checks *
> /gtkbuilder
> /icons
> /jqplot
> /pixmaps
> /python
> /scm
> /translog *
> /ui*
> /accelerator-map *
> /expressions-2.0 *
> /qif-accounts-map *
> /saved-reports-2.8 *
> /saved-reports-2.8-backup *
> /stylesheets-2.0 *
>
> If I create a directory .apps under $HOME then GnuCash installs to it
> without any problem but no link from $HOME/.local/bin to the executable in
> $HOME/.apps is created by the installation and the user would have to
> create this this manually. Once this is done GnuCash seems to run fine from
> $HOME/.apps as a single user app.
>
> The question is do we need to change the recommendation for installing under
> $HOME/.local on the wiki and what should we change it to? If it is agreed
> this is necessary I will modify the wiki to suit.
>
> David Cousens
More information about the gnucash-devel
mailing list