GnuCash won't open after transferring data files from one box to another (2)

Maf. King maf at chilwell.net
Mon Jul 5 10:16:18 EDT 2010


On Monday 05 July 2010 02:40:35 Ken Heard wrote:
> Further to my first post with this subject I discovered if I leave the
> .LNK and .LCK undeleted when I try to open GnuCash a window appears with
> the following text, followed by three options:
>
> "GnuCash could not obtain the lock for /home/ken/accounts/ken09/ken09.gnc"
>
> If I choose 'open anyway' GnuCash will crash immediately and create new
> .LNK and .LCK files.
>
> If I choose 'Create new file' and then select from the list under
> 'Files' the file I want -- ken09.gnc, I am then asked whether I want to
> save it or not.  Regardless of which of those options I choose the
> "GnuCans could not obtain the lock ... window opens again.  If I choose
> the 'Open new file. option Gnu with the accounts tab will open
> momentarily and then crash.
>
> Ken Heard

Hi Ken,

The LNK and LCK files are created to help ensure that only one person can 
access the GC data file at any one time.  If GC exits cleanly, they get 
deleted, but in the event of a crash they are usually left behind - the 
procedure is to either click "Open Anyway" (if you are sure that there isn't 
any other instance of GC running), or to go into your accounts subdirectory 
and delete them manually.

Have you tried disabling the scheduled transaction which runs when you open 
your data file? 

The procedure is probably in the wiki, but in summary:
open a terminal and type the command
gnucash --nofile [enter]

then in preferences, scheduled txn section, uncheck something like "run on 
file start"

then File -> open your data file.

If you have altered your account structure and there is a SX being 
auto-created to a non-existant account, it has caused symptoms like you 
describe before. 

HTH,
Maf.




More information about the gnucash-user mailing list