Possible to move preference file location?

Geert Janssens janssens-geert at telenet.be
Mon Feb 17 13:03:35 EST 2014


On Saturday 01 February 2014 13:45:50 RoseW wrote:
>    The online manual says
>    Microsoft Windows Note: $HOME is at %SYSDRIVE%\Documents and
>    Settings\%USER%\. For example, if your system is :installed on C:
> and your username is "foo", $HOME is C:\Documents and Settings\foo,
> and you'll find your gnucash config :directory at C:\Documents and
> Settings\foo\.gnucash. '
>    In Windows 7 this directory set up is not there. Initially I
> installed Gnucash  to use the root of my user account therefore a
> specific folder for gnucash was not produced.
>    I wondered why this set up did not go into AppData/Roaming/.gnucash
> Gnucash has operated with this group of  individual folders but when
> it comes to backing up or moving these folders to another machine it
> would be handy if I could just grab a main Gnucash folder and all the
> other stuff would be subfolders within.
>    Gimp (photo edit software) spewed some of its files into that user
> root area so these are dispersed among the gnucash folders.... IF I
> create a folder C: Username\.Gnucash  and move the gnucash folders
> (.gconf, .gconfd,gnome2, .gnome2private, .gnucash) into this main
> folder will the software lose track of the path?

Yes gnucash won't find these directories anymore and will recreate them 
again. That is unless you tell it where to look for these directories.

Here is what I propose you do:
- Create a directory "GnuCash" in AppData/Roaming/
- move the directories .gnucash, .gnome2 and .gnome2_private into 
"GnuCash"
- if you are still using gnucash 2.4, move the .gconf and .gconfd 
directories into "GnuCash" as well
- from the directory where you installed the gnucash application, locate 
the file <path to gnucash dir>/etc/gnucash/environment
- open this file in a text editor such as notepad or wordpad
- at the end of this file add one line:
HOME={APPDATA}/GnuCash

Save the file and start gnucash. It should now use the directories 
inside AppData/Roaming/GnuCash.

One few caveat: if you ever reinstall or upgrade gnucash you will have 
to add the line in the environment file again. It gets overwritten by 
the installer.

Lastly this information is also recorded in 
https://bugzilla.gnome.org/show_bug.cgi?id=503722

Hope this helps,

Geert


More information about the gnucash-user mailing list