[GNC-dev] Single User Installation location on Linux

Geert Janssens geert.gnucash at kobaltwit.be
Fri Mar 6 04:25:35 EST 2020

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.

The freedesktop base directory specification [1] 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 
[2]: 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.

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.



[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
[2] https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
Op vrijdag 6 maart 2020 04:37:55 CET schreef David Cousens:
> Strange
> 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.
> David
> -----
> David Cousens
> --
> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

More information about the gnucash-devel mailing list