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

2019-05-03 Thread David Cousens
Geert,

Agree with all the points you and david Carlson made.  I had expected and
guessed that the GnuCashbuild  configured its search directories for
resources from the cmake install prefix, but hadn't actually checked it out
to be sure.

The problem as I see it is recommending a setup for a novice or
inexperienced user new to building and installing who may or may not have
admin privileges to use that will allow them to install and uninstall fairly
easily even when they no longer have the build directory and access to the
make uninstall. Even with a little bit of development experience you can
usually work it out for yourself.

A user who is primarily interested in just using Gnucash and doesn't want to
know about the nitty gritty of development per se but wants to be using the
most up to date version, on the other hand, will get frustrated if every
time he has to update, he has to figure out what went where and how to get
rid of it. 

I'll rework the Wiki page to use a non hidden directory with a gnucash
specific subdirectory as an install point in the example rather than
$HOME/.local  and just add notes to the effect that this directory can be
hidden if desired by prefixing it with a dot. Then a simple  rm -rf can be
used easily. I'll also add some notes about setting up aliases to start it
up. That should cover the user new to building from source.

Then anyone who wants a more sophisticated setup can roll their own.

cheers
David Cousens



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-03 Thread David Cousens
Colin 

There is no reason why the install directory can't just be an ordinary
directory. There is no real reason for it to be hidden. It is what I use if
I do do a local install. The only possible advantage is that if you can hide
the directory it doesn't clutter the view of files when you won't be looking
at program files the majority of the time even though you will be using them 

David



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-03 Thread Geert Janssens
Op vrijdag 3 mei 2019 03:09:43 CEST schreef David Cousens:
> Hi John,
> 
> It was because of a number of posts in the forum, not sure whether DEV or
> USER around the time I reworked the pages which suggested $HOME/.local  for
> single user local installations of GnuCash . I think it may also have been
> specified the previous Wiki page I started from as well. At the time I could
> not find any better suggestions so I left it in place. My own preference
> has been to install in /usr/local or /opt system wide for production. If
> you use make uninstall from the build directory it seems to uninstall
> correctly from $HOME/.local as long as the manifest still exists as the
> paths to each file installed are specified
> 
Indeed. That's the mechanism in place to uninstall packages. It has a few 
flaws though. For this to work
1. the build directory is still around
2. the current state of the build directory still would install files in the 
same spot and at least the same files as the original install.

I have been bitten both ways (one of the conditions didn't apply any more).

These flaws are what triggered the creation of package managers. So in general 
I prefer installing via make install into a unique directory per installed 
application. That way the above pitfalls don't matter. If something changes 
such that make uninstall can't clean up, you can simply remove the complete 
installation directory.

> If I do a local temporary install, I personally install in a subdirectory of
> my home directory and add the relevant search paths to the front of the
> PATH environment variable . You of course have the problem with the order
> in PATH as to whether you search $HOME directories before or after system
> installed paths if you have multiple copies of different versions. Ideally
> in that case you could invoke a startup script which setup the PATH
> variable depending on which version you are starting up and where its
> resouces are located. I have used /opt and /usr/local for different
> versions but the same problem with ordering the search order in PATH
> arises.

You could also define aliases to deal with this, like
alias gnucash-my-build = /home/user/path/to/my/install/bin/gnucash

Then "gnucash" would run the system installed gnucash, "gnucash-my-build" 
would run your own

Or, as I would think most users would like to start gnucash from their Destkop 
environment's menu or application launcher, you can copy the gnucash.desktop 
file from /share/applications to /home/user/.local/share/
applications.
If you then edit the file and change the "Name" value to say "My GnuCash" (and 
do the same for the Name in your language), you can start "My GnuCash" from 
your DE's menu or application launcher. You may have to log out and back in 
for this to work.

> 
> Python installs what it calls site-packages under $HOME/.local which seem to
> be user specific but most of the other data I find in the directory is in
> $HOME/.local/share which seems to be mainly user specific data for various
> packages.
> 
> The Linux File Heirarchy gives no real guidance for the structure of a users
> home directory apart from a reference to XDG and GLib conventions ( can't
> find any reference):
> 
> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
> 
> One stackexchange article suggested duplicating sections of the FHS under
> $HOME which seems a bit extreme.

I believe that suggestion goes with the concept of having $HOME/bin on the 
PATH. But the weakness of installing multiple applications in the same install 
prefix without the safety net of a decent package manager remains.

> If I did that I would be inclined to have a
> specific directory under $HOME with the /bin, /etc, /lib /share directories
> under it. I have an Applications directory for that purpose usually with a
> package sub directory under that which contains the above directories.
> 
I'm more in favor of this approach as well.

> For the little development work on GnuCash I do I have a separate structure
> again under my home directory which has an install subdirectory which I
> install to.

Same here.

> I have often wondered whether I am actually getting to the
> correct libraries by setting up the PATH variable (particularly if I forget
> to set it up). Then there is unsetting PATH when you want to go back to
> production work.

You shouldn't worry about setting paths for getting the proper libraries. 
GnuCash should take care of this itself. It's encoded based on the 
installation prefix you provide while running cmake.
The only reason to add something to the PATH is to allow you to simply type 
"gnucash" somewhere in a shell and that would then start your local 
installation. But even that's entirely optional. You could just as well start 
it by using the full path to the binary, make an alias as described above or 
move it up your path by adding a softlink from $HOME/bin to your gnucash 
binary.

Both of the latter options 

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

2019-05-03 Thread Colin Law
On Fri, 3 May 2019 at 07:26, David Cousens  wrote:
> ...
> 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
> preferences.
>
> cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local/programs/gnucash  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.

I really don't like the idea of installing under a hidden directory (~/.local).

Colin
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-03 Thread David Cousens
John, Geert et al

I have not been able to find any references on user directory organization
apart from the XDG
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html). 
 

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/ where the application stores its resources relative to
/opt/. 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  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
installation.  

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
preferences. 

cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local/programs/gnucash 

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
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread David Cousens
Hi John,

It was because of a number of posts in the forum, not sure whether DEV or
USER around the time I reworked the pages which suggested $HOME/.local  for
single user local installations of GnuCash . I think it may also have been
specified the previous Wiki page I started from as well. At the time I could
not find any better suggestions so I left it in place. My own preference has
been to install in /usr/local or /opt system wide for production. If you use
make uninstall from the build directory it seems to uninstall correctly from
$HOME/.local as long as the manifest still exists as the paths to each file
installed are specified

If I do a local temporary install, I personally install in a subdirectory of
my home directory and add the relevant search paths to the front of the PATH
environment variable . You of course have the problem with the order in PATH
as to whether you search $HOME directories before or after system installed
paths if you have multiple copies of different versions. Ideally in that
case you could invoke a startup script which setup the PATH variable
depending on which version you are starting up and where its resouces are
located. I have used /opt and /usr/local for different versions but the same
problem with ordering the search order in PATH arises.

Python installs what it calls site-packages under $HOME/.local which seem to
be user specific but most of the other data I find in the directory is in
$HOME/.local/share which seems to be mainly user specific data for various
packages.

The Linux File Heirarchy gives no real guidance for the structure of a users
home directory apart from a reference to XDG and GLib conventions ( can't
find any reference):

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

One stackexchange article suggested duplicating sections of the FHS under
$HOME which seems a bit extreme. If I did that I would be inclined to have a
specific directory under $HOME with the /bin, /etc, /lib /share directories
under it. I have an Applications directory for that purpose usually with a
package sub directory under that which contains the above directories.

For the little development work on GnuCash I do I have a separate structure
again under my home directory which has an install subdirectory which I
install to. I have often wondered whether I am actually getting to the
correct libraries by setting up the PATH variable (particularly if I forget
to set it up). Then there is unsetting PATH when you want to go back to
production work. 

Perhaps it is worth investigating the update-alternatives command  used when
several python versions are installed, e.g.
https://askubuntu.com/questions/315646/update-java-alternatives-vs-update-alternatives-config-java.
perhaps using this in startup scripts. Here the installed files are labelled
with the version number and selected by setting a master and slave symbolic
link groups which are setup with the "update-alternatives --set  name path"
command.

Not sure what is the best location and structure for general users for a
local installation though. I would be inclined to go for a directory
labelled with a package name and version number with its own /bin, /etc,
/lib and /share directories and then prepend these to the PATH.

David Cousens



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread John Ralls
Correction: http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html says 
that AT invented /opt for SYSV. 

http://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html is as close to 
canonical as one gets for what different parts of the file hierarchy are for 
and how they should be used.

Regards,
John Ralls

> On May 2, 2019, at 10:03 AM, John Ralls  wrote:
> 
> AT Unix and the real BSD did have /usr/local as the place for installing 
> stuff not part of the system. Sun Microsystems started using that for their 
> Solaris extensions to BSD and invented /opt as the place for 
> locally-installed packages. Both typically require root to install into and 
> some distros have put stuff in one or the other, so care is advised when 
> using either.
> 
> There's another problem: CMake treats both specially and munges the 
> subdirectory locations; this is worst with /opt as it insists on stuffing 
> etc/gnucash into a weird path under /etc so root is required for the install 
> step and gnucash can't find the environment file.
> 
> I lean towards guiding inexperienced users toward keeping everything in their 
> home directories and away from using su or sudo for anything. 
> 
> Regards,
> John Ralls
> 
>> On May 2, 2019, at 9:40 AM, Colin Law  wrote:
>> 
>> On many varieties of Linux /usr/local is the conventional location to
>> add locally built packages.  In this case probably /usr/local/gnucash.
>> I think the build instructions used to suggest that but I may be
>> mistaken.
>> 
>> Colin
>> 
>> On Thu, 2 May 2019 at 17:27, Geert Janssens  
>> wrote:
>>> 
>>> Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
 On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
 
 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 /bin/gnucash to 
>>> /home/bin/gnucash.
>>> This would allow console users to simply type "gnucash" to run their own
>>> gnucash build.
>>> - copy /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
>>> 
>>> 
>>> ___
>>> gnucash-devel mailing list
>>> gnucash-devel@gnucash.org
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>> ___
>> gnucash-devel mailing list
>> gnucash-devel@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread John Ralls
AT Unix and the real BSD did have /usr/local as the place for installing 
stuff not part of the system. Sun Microsystems started using that for their 
Solaris extensions to BSD and invented /opt as the place for locally-installed 
packages. Both typically require root to install into and some distros have put 
stuff in one or the other, so care is advised when using either.

There's another problem: CMake treats both specially and munges the 
subdirectory locations; this is worst with /opt as it insists on stuffing 
etc/gnucash into a weird path under /etc so root is required for the install 
step and gnucash can't find the environment file.

I lean towards guiding inexperienced users toward keeping everything in their 
home directories and away from using su or sudo for anything. 

Regards,
John Ralls

> On May 2, 2019, at 9:40 AM, Colin Law  wrote:
> 
> On many varieties of Linux /usr/local is the conventional location to
> add locally built packages.  In this case probably /usr/local/gnucash.
> I think the build instructions used to suggest that but I may be
> mistaken.
> 
> Colin
> 
> On Thu, 2 May 2019 at 17:27, Geert Janssens  
> wrote:
>> 
>> Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
>>> On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
>>> 
>>> 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 /bin/gnucash to 
>> /home/bin/gnucash.
>> This would allow console users to simply type "gnucash" to run their own
>> gnucash build.
>> - copy /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
>> 
>> 
>> ___
>> gnucash-devel mailing list
>> gnucash-devel@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread Colin Law
On many varieties of Linux /usr/local is the conventional location to
add locally built packages.  In this case probably /usr/local/gnucash.
I think the build instructions used to suggest that but I may be
mistaken.

Colin

On Thu, 2 May 2019 at 17:27, Geert Janssens  wrote:
>
> Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
> > On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
> >
> > 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 /bin/gnucash to /home/bin/gnucash.
> This would allow console users to simply type "gnucash" to run their own
> gnucash build.
> - copy /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
>
>
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread Geert Janssens
Op donderdag 2 mei 2019 18:03:22 CEST schreef Tommy Trussell:
> On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
> 
> 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 /bin/gnucash to /home/bin/gnucash. 
This would allow console users to simply type "gnucash" to run their own 
gnucash build.
- copy /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


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread John Ralls



> On May 2, 2019, at 4:01 AM, Geert Janssens  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.
> 
> While checking for another thread I have found this to be problematic.
> 
> In particular when using this installation prefix, a number of files and 
> directories will be added in $HOME/.local/share/. That directory however is 
> also to primary directory where a running applications store their runtime 
> data. So the same directory is being used as installation directory and data 
> directory.
> 
> That makes it pretty difficult to quickly remove the local gnucash 
> installation in one go as the installation directory may also hold runtime 
> data (and from more than one application!).
> 
> So personally I would recommend against using $HOME/.local as installation 
> prefix. I am however curious where this suggestion originally came from.

A quick search of history shows it was added by David Cousens in 
https://wiki.gnucash.org/wiki/index.php?title=BuildUbuntu16.04=13834=13833.

David, what led you to use that directory?

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread Geert Janssens
Yes, something like that would make more sense to me as well.

Op donderdag 2 mei 2019 17:03:53 CEST schreef Adrien Monteleone:
> Good question.
> 
> I’ve never used that location, and have not otherwise seen any
> recommendation to use it for a single/local-user installation.
> 
> I’ve seen people recommend to recreate the official tree under ~/ (~/usr,
> ~/usr/local, ~/usr/bin) which doesn’t make much sense to me, or something
> else like:
> 
> ~/apps, ~/applications
> 
> I would think a recommendation of:
> 
> $HOME/apps/gnucash, $HOME/applications/gnucash
> 
> would be fine as it would be easier to remove. (one could maybe keep a
> `$HOME/apps/gnucash/build` directory around for that eventual removal)
> 
> Regards,
> Adrien
> 
> > On May 2, 2019, at 6:01 AM, Geert Janssens 
> > 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.
> > 
> > While checking for another thread I have found this to be problematic.
> > 
> > In particular when using this installation prefix, a number of files and
> > directories will be added in $HOME/.local/share/. That directory however
> > is
> > also to primary directory where a running applications store their runtime
> > data. So the same directory is being used as installation directory and
> > data directory.
> > 
> > That makes it pretty difficult to quickly remove the local gnucash
> > installation in one go as the installation directory may also hold runtime
> > data (and from more than one application!).
> > 
> > So personally I would recommend against using $HOME/.local as installation
> > prefix. I am however curious where this suggestion originally came from.
> > 
> > Regards,
> > 
> > Geert
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel




___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread Tommy Trussell
On Thu, May 2, 2019 at 6:02 AM Geert Janssens 
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.

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.)
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread Adrien Monteleone
Good question.

I’ve never used that location, and have not otherwise seen any recommendation 
to use it for a single/local-user installation.

I’ve seen people recommend to recreate the official tree under ~/ (~/usr, 
~/usr/local, ~/usr/bin) which doesn’t make much sense to me, or something else 
like:

~/apps, ~/applications

I would think a recommendation of:

$HOME/apps/gnucash, $HOME/applications/gnucash

would be fine as it would be easier to remove. (one could maybe keep a 
`$HOME/apps/gnucash/build` directory around for that eventual removal)

Regards,
Adrien

> On May 2, 2019, at 6:01 AM, Geert Janssens  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.
> 
> While checking for another thread I have found this to be problematic.
> 
> In particular when using this installation prefix, a number of files and 
> directories will be added in $HOME/.local/share/. That directory however is 
> also to primary directory where a running applications store their runtime 
> data. So the same directory is being used as installation directory and data 
> directory.
> 
> That makes it pretty difficult to quickly remove the local gnucash 
> installation in one go as the installation directory may also hold runtime 
> data (and from more than one application!).
> 
> So personally I would recommend against using $HOME/.local as installation 
> prefix. I am however curious where this suggestion originally came from.
> 
> Regards,
> 
> Geert

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

2019-05-02 Thread Geert Janssens
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.

While checking for another thread I have found this to be problematic.

In particular when using this installation prefix, a number of files and 
directories will be added in $HOME/.local/share/. That directory however is 
also to primary directory where a running applications store their runtime 
data. So the same directory is being used as installation directory and data 
directory.

That makes it pretty difficult to quickly remove the local gnucash 
installation in one go as the installation directory may also hold runtime 
data (and from more than one application!).

So personally I would recommend against using $HOME/.local as installation 
prefix. I am however curious where this suggestion originally came from.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel