[PATCH] Override GConf path for development separation

James Radley james at hiltonbury.com
Thu Mar 22 17:21:54 EDT 2007


Andreas Köhler wrote:
> Author: andi5
> Date: 2007-03-21 18:50:12 -0400 (Wed, 21 Mar 2007)
> New Revision: 15746
> Trac: http://svn.gnucash.org/trac/changeset/15746
>
> Modified:
>    gnucash/trunk/src/engine/gnc-filepath-utils.c
> Log:
> Patch from James Radley to allow override of the dotfile location.
>
> Read environment variable GNC_DOT_DIR and, if available, use this
> instead of `g_get_home_dir`/.gnucash.  This allows one develop without
> impacting an existing stable installation, excepting shared GConf
> keys.  Setting HOME does not help, because g_get_home_dir prefers
> passwd entries.
>
>
>   

Thanks for applying the patch Andreas.

After your comment above, I've had a play with the GConf settings as 
well, and I've got a patch that allows you to override the gconf base 
path. It's not quite as clean in use as the DOT_DIR override, but we can 
set the base path ( currently fixed at /apps/gnucash ) to something 
else, and ItWorksForMe :-)

GC seems to whinge a bit if it can't find the schemas at startup, so if 
you are going to override the GConf settings, I'd suggest doing a

$ export GNC_GCONF_PATH=/my/new/gconf/path
$ gconftool-2 --dump /schemas/apps/gnucash > /tmp/gnc.schemas
$ gconftool-2 --dump /apps/gnucash > /tmp/gnc.apps

Then edit the two /tmp files to change the second line

<entrylist base="/schemas/apps/gnucash">
to
<entrylist base="/schemas/my/new/gconf/path">

then

$ gconftool-2 --load /tmp/gnc.schemas
$ gconftool-2 --load /tmp/gnc.apps

which should populate the gnucash gconf schemas for your new path, and 
make everything work okay.

James


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gconf.patch
Type: text/x-patch
Size: 3259 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20070322/3e7f1a8b/attachment.bin 


More information about the gnucash-devel mailing list