Opening multiple files

Geert Janssens geert.gnucash at kobaltwit.be
Thu Apr 2 04:06:29 EDT 2015


On Wednesday 01 April 2015 16:46:21 Derek Atkins wrote:
> Eric Siegerman <pub08-gnc at davor.org> writes:
> > [ Changing the subject line, as this has strayed pretty far
> > 
> >   afield of the OP's question ]
> > 
> > On 03/30/2015 10:48 AM, David Carlson wrote:
> >> When I said " multiple instances of GnuCash opening
> >> several data files at once" I was referring to a single user
> >> opening
> >> multiple instances of GnuCash with different data files in the same
> >> user space.  That is not recommended because the same prefs files
> >> are used and GnuCash will shoot itself in the foot when the
> >> program is closed.> 
> > What does "shooting itself in the foot" look like?
> > 
> > Suppose I open two different .gnucash files -- necessarily in two
> > GnuCash processes -- as the same Linux/Windows/MacOS user.  (XML
> > backend, which is what I'm using.)
> > 
> > Am I correct in assuming that:
> >   - as regards the actual accounting data -- the .gnucash files
> >   
> >     themselves -- everything will be fine; no interaction
> >     between the two
Correct.

> >   
> >   - as regards prefs, the last process to exit will win; its
> >   
> >     prefs will silently overwrite those from the gnc process
> >     that exited earlier
> >   
There is not really a problem with "prefs". GnuCash has multiple ways to 
store preferences depending on whether the preference is global (most of 
the preferences under Edit->Preferences) or related to your data file 
(typically those under File->Properties and some gui state information 
like which tabs/windows are open).

The global preferences are updated live. That is, if you change one 
preference in one open instance of gnucash, the other instance will 
immediately be notified of this change. So these preferences will always 
be in sync.

The file base preferences are kept in a separate file for each gnucash 
datafile. If you make a change in one book that will only affect that 
book, not other books (open or closed).



Where it can go wrong is in saved reports and modified stylesheets. 
There is only one single file that keeps all saved reports for all of 
your books. That file is read when gnucash is loaded and written 
whenever you save a report.

So if you
1. have two instances of gnucash open (with different books)
2. save a report in one book
3. subsequently save a report the other book

THEN the new report from your first book will be lost. The second book 
never rereads the saved reports file once its started, so it didn't 
learn about the new report. Instead it writes out what it does know.

A similar thing will happen if you make your own stylesheets 
simultaneously in two books.

Other than these two areas there are no conflicts with having two books 
open at the same time that I'm aware of. 

For completeness I'll add I never used the online banking part of 
gnucash. That may be one area that is sensitive to preference clashes.

Regards,

Geert


More information about the gnucash-user mailing list