Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Geert Janssens
Op maandag 16 april 2018 22:12:55 CEST schreef Alen Siljak:
> Michael,
>  
> if you look at the v3.0 release notes, it states that
> "Data file directories are now located appropriately to the operating
> system's conventions by default: Windows: CSIDL_APPDATA/Gnucash
> MacOS: $HOME/Application Support/Gnucash
> Linux: $XDG_CONFIG_HOME/gnucash (or the default $HOME/.config/gnucash)
> It's still possible to overried with the environment variable GNC_DOC_PATH,
> which replaces GNC_DOT_DIR in earlier versions of GnuCash." 
> So, the config directory has changed. On Windows, it used to default to
> ~/.gnucash but not any more. I don't have a Windows system at hand so can't
> give you the exact default location. 

Unfortunately there's one error in that announcement: it should be 
GNC_DATA_HOME instead of GNC_DOC_PATH. And this only works to override 
$HOME/.local/share/gnucash (and equivalents on the other platforms)
As I wrote in my reply to Michael, there is currently no way to override
$HOME/.config/gnucash (or the equivalents on other platforms).

> Geert,
>  
> I still find it strange that, even though there is no XDG variable that
> points to ~/.local/share, gnucash directory is still located there.
> I mean,
> there is no XDG_CONFIG_HOME nor XDG_DATA_HOME set on my system. There must
> be other standards (you know what's good about standards? There's so many
> of them). 

I did mention this as well: if no XDG variable is set, the specification 
dictates which default directories to use. And that's exactly what gnucash 
does. Feel free to read the full specification, I had added a link to it in my 
original reply.

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Alen Siljak
   Michael,

   if you look at the v3.0 release notes, it states that
   "Data file directories are now located appropriately to the operating
   system's conventions by default:
 * Windows: CSIDL_APPDATA/Gnucash
 * MacOS: $HOME/Application Support/Gnucash
 * Linux: $XDG_CONFIG_HOME/gnucash (or the default
   $HOME/.config/gnucash)

   It's still possible to overried with the environment variable
   GNC_DOC_PATH, which replaces GNC_DOT_DIR in earlier versions of
   GnuCash."

   So, the config directory has changed. On Windows, it used to default to
   ~/.gnucash but not any more. I don't have a Windows system at hand so
   can't give you the exact default location.

   Geert,

   I still find it strange that, even though there is no XDG variable that
   points to ~/.local/share, gnucash directory is still located there. I
   mean, there is no XDG_CONFIG_HOME nor XDG_DATA_HOME set on my system.
   There must be other standards (you know what's good about standards?
   There's so many of them).

   Cheers

   Sent: Monday, April 16, 2018 at 8:10 PM
   From: "Fross, Michael" <mich...@fross.org>
   To: "Geert Janssens" <geert.gnuc...@kobaltwit.be>
   Cc: Gnucash-User <gnucash-user@gnucash.org>, cicko
   <alen.sil...@gmx.com>
   Subject: Re: [GNC] XDG_CONFIG_HOME
   Just so I'm clear:

   XDG_DATA_HOME will point to the GNC config directory on linux.
   GNC_DATA_HOME will do likewise on Windows?  And the config directory is
   essentially the .gnucash from the v2.6 release?

   I think this is right, just making sure I understand.

   Thank you,

   Michael

   On Mon, Apr 16, 2018 at 11:57 AM, Geert Janssens
   <[1]geert.gnuc...@kobaltwit.be> wrote:

 Op zondag 15 april 2018 14:32:12 CEST schreef cicko:
 > Continuing from another thread, this is a separate issue.
 > On my OpenSuse system, I see no XDG_CONFIG_HOME variable when I do
 > `printenv`. Echoing the variable itself also displays nothing.
 >
 > This would not be a problem on its own but I see no
 ~/.config/gnucash folder
 > in order to do some GTK styling customizations. Could any linux
 gurus share
 > some wisdom here? Thanks!
 XDG_DATA_HOME will default to ~/.config if it is not explicitly set.
 That's
 what the free desktop specification requires.
 And ~/.config/gnucash is not created automatically indeed. You can
 create it
 yourself if you need it.
 Geert

References

   1. mailto:geert.gnuc...@kobaltwit.be
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Geert Janssens
Op maandag 16 april 2018 21:00:17 CEST schreef Fross, Michael:
> Thank you Geert.  This is extremely helpful.  I appreciate you taking the
> time to document all of that.  May make sense to get this into the  wiki...
> 
Feel free to add it somewhere :)

> For Windows, I assume there are also two directories that correspond do
> ~.local/share/gnucash and ~/.config/gnucash.  I'll take a look for them.

Windows doesn't seem to make this distinction in general, so on that platform 
config files and application data files still end up in the same directory:
CSIDL_APPDATA\GnuCash

CSIDL_APPDATA is a Windows configurable similar to the XDG directories. I 
don't know Windows well enough to know how you can customize it though. It's 
default value is
c:\Users\\AppData\Roaming

Regards,

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Fross, Michael
Thank you Geert.  This is extremely helpful.  I appreciate you taking the
time to document all of that.  May make sense to get this into the  wiki...

For Windows, I assume there are also two directories that correspond do
~.local/share/gnucash and ~/.config/gnucash.  I'll take a look for them.

Kind regards,

Michael

On Mon, Apr 16, 2018 at 1:39 PM, Geert Janssens 
wrote:

> Op maandag 16 april 2018 20:10:16 CEST schreef Fross, Michael:
> > Just so I'm clear:
> >
> > XDG_DATA_HOME will point to the GNC config directory on linux.
> > GNC_DATA_HOME will do likewise on Windows?  And the config directory is
> > essentially the .gnucash from the v2.6 release?
> >
> > I think this is right, just making sure I understand.
> >
> > Thank you,
> >
> > Michael
>
> Hi Michael,
>
> No it's more subtle than that.
>
> The XDG_* variables come from a free desktop specification [1] that
> defines a
> number standard directories and paths that each system that claims to
> follow
> this standard should adhere to. Most desktop environments (kde, gnome,
> xfce,...) on linux do adhere to this so they can interoperate properly.
> Many
> programs rely on this, and gnucash is no exception as it's based on gtk
> (which
> underpins the gnome desktop environment as well).
>
> There are two that gnucash uses as of gnucash 3.0 and related to user data:
> XDG_DATA_HOME (defaults to ~/.local/share on linux)
> XDG_CONFIG_HOME (defaults to ~/.config on linux)
>
> On systems that follow the XDG specification, users can override either by
> setting environment variables with these names. In practice this is
> everywhere
> except on Windows and in the Quarz version of gnucash. Both of these
> instead
> use the platform specific default paths and will ignore the XDG_* settings
> [2].
>
> As you may observe neither path is specific to gnucash. These directories
> are
> shared by all applications adherering to the above specification. So in
> order
> to keep these directories tidy, most applications make an application
> specific
> subdirectory in there. For gnucash on linux these are (predictably)
> ~/.local/share/gnucash
> ~/.config/gnucash
>
> The former can be overridden by setting GNC_DATA_HOME, the latter can't be
> overridden (that's an oversight, not intentional).
>
> Lastly, the 2.6 .gnucash dir has no one to one mapping to a directory
> under
> 3.0. In fact it's content has been distributed over the two directories
> above.
> The rationale is this:
> Any configuration file we expect the user to tweak manually should go in
> config/gnucash. GnuCash will never alter any file in there (except for the
> one-time initial migration. Any file we don't expect the user to tweak
> manually (as it's written and maintained by gnucash itself) should go into
> local/share/gnucash. We expect users to not touch these files directly and
> gnucash can overwrite these at any time.
>
> Files that should go in .config are things like a customized css file, a
> config file with custom scheme code, ...
> Files that still go in .local/share are saved reports (gnucash manages
> these),
> state files, style sheets,...
>
> Currently the accelerator-maps are also still stored in there, but I
> believe
> this is a mistake as well that should be corrected at some point.
>
> I hope this additional background info is helpful.
>
> Regards,
>
> Geert
>
>
> [1] https://specifications.freedesktop.org/basedir-spec/
> basedir-spec-latest.html
> [2] this is not completely true, but I'm trying to to complicate it even
> more.
> The be precise: gnucash itself will ignore the two environment variables
> on
> Windows and OS X/Quarz, but some of its dependencies don't (like you can
> set
> XDG_CONFIG_HOME to tweak where gtk looks for its user config for example).
>
>
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Geert Janssens
Op maandag 16 april 2018 20:10:16 CEST schreef Fross, Michael:
> Just so I'm clear:
> 
> XDG_DATA_HOME will point to the GNC config directory on linux.
> GNC_DATA_HOME will do likewise on Windows?  And the config directory is
> essentially the .gnucash from the v2.6 release?
> 
> I think this is right, just making sure I understand.
> 
> Thank you,
> 
> Michael

Hi Michael,

No it's more subtle than that.

The XDG_* variables come from a free desktop specification [1] that defines a 
number standard directories and paths that each system that claims to follow 
this standard should adhere to. Most desktop environments (kde, gnome, 
xfce,...) on linux do adhere to this so they can interoperate properly. Many 
programs rely on this, and gnucash is no exception as it's based on gtk (which 
underpins the gnome desktop environment as well).

There are two that gnucash uses as of gnucash 3.0 and related to user data:
XDG_DATA_HOME (defaults to ~/.local/share on linux)
XDG_CONFIG_HOME (defaults to ~/.config on linux)

On systems that follow the XDG specification, users can override either by 
setting environment variables with these names. In practice this is everywhere 
except on Windows and in the Quarz version of gnucash. Both of these instead 
use the platform specific default paths and will ignore the XDG_* settings 
[2].

As you may observe neither path is specific to gnucash. These directories are 
shared by all applications adherering to the above specification. So in order 
to keep these directories tidy, most applications make an application specific 
subdirectory in there. For gnucash on linux these are (predictably)
~/.local/share/gnucash
~/.config/gnucash

The former can be overridden by setting GNC_DATA_HOME, the latter can't be 
overridden (that's an oversight, not intentional).

Lastly, the 2.6 .gnucash dir has no one to one mapping to a directory under 
3.0. In fact it's content has been distributed over the two directories above. 
The rationale is this:
Any configuration file we expect the user to tweak manually should go in 
config/gnucash. GnuCash will never alter any file in there (except for the 
one-time initial migration. Any file we don't expect the user to tweak 
manually (as it's written and maintained by gnucash itself) should go into 
local/share/gnucash. We expect users to not touch these files directly and 
gnucash can overwrite these at any time.

Files that should go in .config are things like a customized css file, a 
config file with custom scheme code, ...
Files that still go in .local/share are saved reports (gnucash manages these), 
state files, style sheets,...

Currently the accelerator-maps are also still stored in there, but I believe 
this is a mistake as well that should be corrected at some point.

I hope this additional background info is helpful.

Regards,

Geert


[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
[2] this is not completely true, but I'm trying to to complicate it even more. 
The be precise: gnucash itself will ignore the two environment variables on 
Windows and OS X/Quarz, but some of its dependencies don't (like you can set 
XDG_CONFIG_HOME to tweak where gtk looks for its user config for example).


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Fross, Michael
Just so I'm clear:

XDG_DATA_HOME will point to the GNC config directory on linux.
GNC_DATA_HOME will do likewise on Windows?  And the config directory is
essentially the .gnucash from the v2.6 release?

I think this is right, just making sure I understand.

Thank you,

Michael

On Mon, Apr 16, 2018 at 11:57 AM, Geert Janssens  wrote:

> Op zondag 15 april 2018 14:32:12 CEST schreef cicko:
> > Continuing from another thread, this is a separate issue.
> > On my OpenSuse system, I see no XDG_CONFIG_HOME variable when I do
> > `printenv`. Echoing the variable itself also displays nothing.
> >
> > This would not be a problem on its own but I see no ~/.config/gnucash
> folder
> > in order to do some GTK styling customizations. Could any linux gurus
> share
> > some wisdom here? Thanks!
>
> XDG_DATA_HOME will default to ~/.config if it is not explicitly set.
> That's
> what the free desktop specification requires.
> And ~/.config/gnucash is not created automatically indeed. You can create
> it
> yourself if you need it.
>
> Geert
>
>
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-16 Thread Geert Janssens
Op zondag 15 april 2018 14:32:12 CEST schreef cicko:
> Continuing from another thread, this is a separate issue.
> On my OpenSuse system, I see no XDG_CONFIG_HOME variable when I do
> `printenv`. Echoing the variable itself also displays nothing.
> 
> This would not be a problem on its own but I see no ~/.config/gnucash folder
> in order to do some GTK styling customizations. Could any linux gurus share
> some wisdom here? Thanks!

XDG_DATA_HOME will default to ~/.config if it is not explicitly set. That's 
what the free desktop specification requires.
And ~/.config/gnucash is not created automatically indeed. You can create it 
yourself if you need it.

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-15 Thread cicko
Roger Miskowicz wrote
> in Linux 16.04 this is where I have:
> 
> ~/.local/share/gnucash/accelerator-map

Yes, that's it. Thank you very much!

Using search in file manager yesterday did not find it. Perhaps because it
is a hidden folder.



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-15 Thread Roger Miskowicz
in Linux 16.04 this is where I have:

~/.local/share/gnucash/accelerator-map


On Sun, Apr 15, 2018 at 5:19 PM, cicko  wrote:

> Hm, now I'm trying to set up an accelerator by creating accelerator-map
> file
> in ~/.config/gnucash and it has no effect.
>
> Also, setting it manually like this
>
> GNC_DOC_PATH=~/.config/gnucash gnucash
>
> does not change anything.
> There is definitely nowhere in my user directory tree any mention of
> gnucash, which is weird.
> Is there a way to check where the settings are expected?
> The trace file did not provide any clues in that regard.
>
>
>
> --
> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-15 Thread cicko
Hm, now I'm trying to set up an accelerator by creating accelerator-map file
in ~/.config/gnucash and it has no effect. 

Also, setting it manually like this

GNC_DOC_PATH=~/.config/gnucash gnucash

does not change anything. 
There is definitely nowhere in my user directory tree any mention of
gnucash, which is weird.
Is there a way to check where the settings are expected?
The trace file did not provide any clues in that regard.



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-15 Thread cicko
Maf. King wrote
> However, I don't have that variable in my environment either.  Maybe the 
> default is ~/.config unless overridden?  I have plenty of stuff in
> ~/.config!

Thanks for the info, Maf. Yes, it should be ~/.config (and it probably is)
but there was no gnucash folder there. I've now created it manually and
added the gtk-3.0.css file. The styles are somehow fixed even without adding
any of the custom styles in the file.
Some magic happening there but everything is fine. 
Today I've really experienced several things fixing themselves up on their
own while I was just poking around. It feels strange but everything seems to
work now. Hope it does tomorrow, too! :)

Cheers



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] XDG_CONFIG_HOME

2018-04-15 Thread Maf. King
On Sunday, 15 April 2018 13:32:12 BST cicko wrote:
> Continuing from another thread, this is a separate issue.
> On my OpenSuse system, I see no XDG_CONFIG_HOME variable when I do
> `printenv`. Echoing the variable itself also displays nothing.
> 
> This would not be a problem on its own but I see no ~/.config/gnucash folder
> in order to do some GTK styling customizations. Could any linux gurus share
> some wisdom here? Thanks!
> 

I'm on OpenSuSE Leap 42.3, but haven't yet made the upgrade to GC 3.0.  
However, I don't have that variable in my environment either.  Maybe the 
default is ~/.config unless overridden?  I have plenty of stuff in ~/.config!

HTH,
Maf.


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.