[kmymoney] [Bug 475674] New: Create a Lock File when running KMyMoney

Brendan bugzilla_noreply at kde.org
Mon Oct 16 01:05:06 BST 2023


https://bugs.kde.org/show_bug.cgi?id=475674

            Bug ID: 475674
           Summary: Create a Lock File when running KMyMoney
    Classification: Applications
           Product: kmymoney
           Version: git (master)
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: kmymoney-devel at kde.org
          Reporter: 3 at Coupe7.com
  Target Milestone: ---

I use KMM on multiple systems. My data file is shared between my various Linux
systems and several backup servers via Synthing.

When I forget to close KMM before opening it on a different system, I can end
up with 2 versions of the KMM data file.

I have created a workaround with a script that starts KMM (kmymoney.sh). It
checks to see if there is a lock file present at the designated path. If the
lock file is present, I use Zenity to display a message that file is already
open on a different system and I display the name of the system where KMM is
already running.

If the lock file is not present, I create the lock file which has the same name
as the KMM data file that I am trying to open plus .lock. The lock file has the
name of the host that is running KMM. Synthing syncs this file to my backup
systems and any system that is online immediately. If I put a system to sleep
without closing KMM, the lock file is still present. If I then wake up or boot
up a different system, it will receive the lock file and prevent me from
running KMM with the same data file.

It would be ideal if KMM handled all of this internally. By default i think the
lock file should be stored in the same path as the data file but it might make
sense to make it configurable. The home directory would not work for my setup
since I do not sync my entire home directory with Syncthing.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list