[GNC-dev] Single User Installation location on Linux
Frank H. Ellenberger
frank.h.ellenberger at gmail.com
Fri Mar 6 13:04:15 EST 2020
Am 06.03.20 um 10:25 schrieb Geert Janssens:
> Yes, I noticed that too. Looking at the history it looks like Frank already made this change in May
> last year.
> I also googled around a bit more on this subject. And it looks like there are different
> interpretations of how $HOME/.local should be used.
Looking back that change was incomplete, because I had the implicit
assumption of building while developing. In that case i would still
suggest to use a separate directory like $HOME/test and the PATH
adjustment in the one or other way - as it has to be done IIRC when
installing to /opt. Then you can simply remove it, if something went wrong.
Building a stable/released version is a different task and then using
$HOME/.local is the right place. You can always return to that version
and run 'make uninstall'.
> The freedesktop base directory specification  is fairly vague in its definition. It mentions
> "user-specific data files". GnuCash interprets this as internal state files, which is gnucash data
> that's user specific. Many other applications do the same including gnome-shell and plenty of
> other default gnome and kde applications. Others like LibreOffice on the other hand exclusively
> use $HOME/.config.
> On the other hand systemd reinterprets this differently and has its own freedesktop spec for this
> : in their interpretation $HOME/.local is used to install applications locally for a single user.
> From this it follows $HOME/.local/share is supposed to hold the equivalent of /usr/share.
> The systemd spec defines $HOME/.config to be the location for user-specific configuration and
> state data. So according to that spec what we currently store in $HOME/.local/share/gnucash
> would actually belong in $HOME/.config as well.
IMHO we should keep the almost constant, user editable configuration
separated from the programs state data. I assume the mentioned programs
have been lazy and simply moved $HOME/.appname to $HOME/.config/appname.
> This new interpretation conflicts with ours unfortunately but does explain why many debian
> based distros have $HOME/.local/bin in their PATHs by default.
> I don't know what is the best way forward. These two standards simply conflict and many other
> apps are (still) in the same boat. We could avoid the conflict by shunning $HOME/.local/share
> and instead save all metadata in $HOME/.config as LibreOffice does. In a way that would
> simplify matters as that would give us a single config directory per supported platform where
> we currently have two for linux and one for the other platforms. On the other hand it would
> mean yet another relocation of metadata which is no fun.
>  https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
>  https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
> Op vrijdag 6 maart 2020 04:37:55 CET schreef David Cousens:
>> I or someone else must have changed the wiki after the previous discussion.
>> It now has $HOME/opt as a recommended location and points out that it can be
>> any directory the user chooses.
More information about the gnucash-devel