Kmymoney cannot find initial file

I’m a brand new kmymoney user on Zorin (from Windows 10, Quicken). Trying to start a new account using the setup steps. Accepts settings choices and a couple of ledger entries OK. All works fine until I save, close/quit and try to reopen that initial file. I get a “file not found” error message:

/run/user/1000/doc/d0eb1813/ccfcu.kmy is either an invalid filename or the file does not exist. You can open another……

Program seems to have created the file, name shows up at top of page.

I try looking for the file in the folder path I chose, but don’t see anything. Have uninstalled and reloaded kmymoney from Zorin software tab, same outcome. Am stuck and can’t seem to find on point help threads.

Thanks

Not very skilled in operating in Zorin yet.

Welcome to KMyMoney and Linux. One thing to remember is that things are definitely different from Windows, even if you make the desktop look very similar. My guess is that KMyMoney created your data file in your home directory. One thing to try is after KMyMoney complains about not being able to find the file, check the File/Open Recent menu and see if the file is listed there, with it’s full path. If that does work, you are set, as by default, the program does try to open the most recent data file it did have open. If that does not work, you can create a new file (it doesn’t need to contain any real data) and pay attention to where it gets saved when you do save it. It is likely your earlier file is in the same folder.

I am not familiar with Zorin, so I don’t know if it is changing common defaults, but in that path, 1000 is most likely your user-id, but I’m not sure what d0eb1813 refers to. It looks like a (random?) hex string, so perhaps it refers to your user session (pure guess on my part, based on nothing.) You might also look under /run/user/1000/doc for other folders which might contain your data file.

You might also start browsing any Zorin mail lists, wiki, or forums to see if others have had similar problems locating newly created files (not just for KMyMoney.)

When you say the name shows up at the top of the page, when is that? It won’t know the file name until you first save the file, or it successfully opens it. You can also do a File/Save As (but don’t actually save it) since the file dialog should start in the same folder as the original file.

Let us know if any of this helps (or especially if it doesn’t.

And then when you do locate the file, you don’t have to leave it there. You can move it to a directory that makes sense to you and then start KMyMoney and use File Open and point to the new location. The program will remember that.
BTW, I also moved here (Fedora and KMyMoney) from Windows and Quicken. I could not be happier. Feel free to ask any question of this group or any Linux group. You will find them all very eager to help. A

What version of KMyMoney do you have? It sounds like you have the flatpak since /run/user/1000/doc/d0eb1813/ccfcu.kmy looks like a path from the flatpak document portal.

If you know where you saved the file, try opening it with the “Open” dialog rather than using the recent files list. Flatpak applications run in a sandbox and use portals to request access to files. This usually works seamlessly but in some cases the permissions can get lost, in which case the recent files list could include files the KMyMoney flatpak no longer has permission to access. Uninstalling and reinstalling is one way those permissions get lost.

You can run flatpak documents --columns=all org.kde.kmymoney to see how the path from the portal maps to the file. On my system that lists all the files I have opened with the KMyMoney flatpak, not just what it currently has access to.

If you don’t care about the sandbox restrictions, you could install Flatseal and give KMyMoney static permission to access any files in your home directory (or just where you want to keep your file). Or if you have a recent enough version of Plasma you can install the flatpak KCM and adjust flatpak permissions in System Settings.

Thanks for the quick comebacks. As I went thru the suggestions trying to create a new file and paying attention to where it gets saved, at first I didn’t see it using the default .kmy extensions, so clicked on “all files”. There in the path I originally spec’d was this:

.xpd-CCFCU.kmy.odbncn-JodG3S (in the page header)

which when opened is my initial account file. It now shows up in “open recent” list. Though the kmy app now opens that file fine, I can’t find it when looking in the files tab, so can’t move it or back it up. Going to have to think on it for a while and get used to moving around in Zorin. Will try and work thru the rest of the suggestions to see if it comes clear.

BTW I running Kmymoney V5.2.1 from a Flathub Flatpak (the only choice offered). The Zorin version is 17.3 Core

Thanks

Since that file starts with a dot it is hidden. You can set Dolphin (or whatever file manager you use) to show hidden files so you can find it. I think that’s the temporary file KMyMoney creates when saving. It looks like when in a flatpak the temporary file does not get deleted like it should, so I’ll have to look into that.

I think KMyMoney only writes to a temporary file if the file you’re saving to already exists, so your file should be there in the same folder.

Another thing you could try if you can’t find your original file, is open the temporary file (the .xpd-CCFCU.kmy.odbncn-JodG3S one) and “Save As” your desired file name.

KMyMoney always writes to a temporary file and once that is successful renames it to the name the user provided. If it does exist beforehand, it does remove it on systems where a simple rename does not work to replace the existing file (MS-Windows).

I don’t know which kind of influence the flatpak ecosystem has on this operation.

Update: Tried opening recent temp file and save as “CCFCU.kmy”. To keep it simple saved to Home folder. When I then look at Home (cntrl H to show hidden files) this is what shows as the latest non temp file:

.xpd-ccfcu.kmy.bNGaHw-gtLUOE

Questions:

  • Is this the main file, even though it isn’t exactly the same as the header bar when the app is open?
  • If this is the main file can I copy and save to say a USB drive as backup?

In “.xpd-ccfcu.kmy.bNGaHw-gtLUOE” only the bold part may be known to KMyMoney (see below). I have no idea where the prefix .xpd- and suffix bNGaHw-gtLUOE come from.

More surprising is the fact that you state saving the file as CCFCU.kmy but that gets converted to lower case in the resulting filename. Something very strange is going on here.

I don’t know what’s happening. Are you absolutely sure it didn’t save to the filename you chose? (Besides the file with the long name) On my machine it saves successfully to the name I choose, but I also get a temp file.

You could try running it from a terminal with flatpak run org.kde.kmymoney. There will be a lot of output to the terminal as it starts up. Try saving or saving as and see if there are any warnings or anything printed to the terminal.

If you’d rather not troubleshoot and just want it to work:

  1. Install Flatseal
  2. Open Flatseal, find KMyMoney (possibly listed as org.kde.kmymoney) and give it permission to access your home folder

Then KMyMoney in the flatpak will have the same access to your home folder as a native package would, and won’t need to go through the portal. I think that will make it work.

Success. Installed Flatseal, adjusted the Kmymoney flatpak permissions and all works fine. Resaveing the temp file as CCFCU.kmy and I now can see it in the Home folder.

Thanks

1 Like

Great, thanks for confirming that worked! I’ll dig deeper into what’s happening and try to fix it so the extra permissions aren’t necessary in the future.

The flatpak is now built with permission to access the user’s home directory, so setting permissions in Flatseal should not be necessary anymore. That permission is also necessary for the backup files to get saved the right place.

The original problem in this topic is different than what I was observing with temporary files. See this comment for an explanation of what was happening.