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

Geert Janssens geert.gnucash at kobaltwit.be
Thu May 2 12:26:47 EDT 2019


Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
> On Thu, May 2, 2019 at 6:02 AM Geert Janssens <geert.gnucash at kobaltwit.be>
> 
> wrote:
> > Our current wiki on building gnucash for Ubuntu 16.04 (https://
> > wiki.gnucash.org/wiki/BuildUbuntu16.04) suggests $HOME/.local as a valid
> > installation prefix.
> 
> ...
> 
> > So personally I would recommend against using $HOME/.local as installation
> > prefix. I am however curious where this suggestion originally came from.
> 
> This is entirely speculation... I'm looking at this system where I've been
> testing the GnuCash versions available as Snap and Flatpak... and I see
> that the Flatpak installation apparently added
> ~/.local/share/flatpak/exports/share to the $XDG_DATA_DIRS environment
> variable.
> 
> Maybe whoever wrote the wiki entry was also working with Flatpak and
> thought .local would be a good place to stash things to make them more
> accessible to Flatpak.
> 
Possibly.

> I would think ~/bin would be a more ideal suggestion because I see it is
> already defined in my bash $PATH on this Ubuntu machine. (And I'm pretty
> sure I didn't add it, though I may have.)

That would be another alternative location. To have gnucash benefit from ~/bin 
being on the path though the gnucash binary itself should be ~/bin/gnucash.

Translating this back to the required installation prefix would mean the 
installation prefix should be $HOME.

This is certainly possible but has the drawback the installation would add 
extra directories in your home directory, like
~/share
~/etc
~/lib(64)
...

That may be cluttering the home directory more than the average user may like. 
And in addition if someone is adding other binaries to ~/bin it again becomes 
more difficult to keep the gnucash build separate from everything else.

To me something like Adrien suggested makes most sense.
One could add two extra steps to simplify launching gnucash afterwards:
- make a softlink from <installation_prefix>/bin/gnucash to /home/bin/gnucash. 
This would allow console users to simply type "gnucash" to run their own 
gnucash build.
- copy <installation/prefix>/share/applications/gnucash.desktop to
~/.local/share/applications
That should make you graphical environment aware of your self-built gnucash 
and have it pop up in the usual places to launch applications (the Kicker menu 
on KDE, or the gnome-shell application launcher).

Regards,

Geert




More information about the gnucash-devel mailing list