Database and user directory locations on current macOS

I had been using the Gramps 5.1 app package on macOS 10.14 (Mojave, which is long out of date but which I was using until now for reasons unrelated to Gramps). Gramps’ database, its user directory and its configuration were in ~/Library/Application Support/gramps as documented in the manual.

I moved to a computer with macOS 14.6 (Sonoma) and no previous Gramps installation or data, and I downloaded the Gramps 5.2 app package. Gramps’ database and its user directory are now in ~/.local/gramps. Its configuration is now in ~/.config/gramps. (It seems Gramps 5.2 follows the XDG basedir specification.) That’s fine functionally, but isn’t documented, e.g. on these pages

Can someone in the know confirm that this change is intended? And can they confirm that (as I think I gathered from forum discussions) the old locations would be used if they exist, i.e. if 5.2 were run on a computer where 5.1 had previously been run? If it’s clear enough to me I’ll update the manual.

We implemented the XDG specification in v5.2 with pull request #1368 “Support XDG base directory specification”. The data, config and cache directories are now obtained using library calls.

Files in the old locations are still used if they exist.

1 Like

I have not been able to get enough of a handle on the XDG changes, the grandfathering of old paths (and old gramps.ini files), the OS variations and the various idiosyncrasies to write cogent User documentation.

The apparent rules are too complex for me to make a document readable by non-technical readers.

I do not even have a starting point for easing the confusion of users.

@DaveSchweisguth
There is another thread with some Python code (which can be run in the Python Eval gramplet or SuperTool) to make Gramps list the global constants that are specific to your computer configuration.

I agree it is confusing. On a new 5.2 MacOS install, the directories are:

Config Files (*.ini) : ~/.config/gramps/gramps52/
Addons: ~/.local/share/gramps/gramps52/plugins
Database: ~/.local/share/gramps/grampsdb

In 5.1,

Config Files (*.ini) : ~/Library/Application Support/gramps/gramps51/
Addons : ~/Library/Application Support/gramps/gramps51/
Database : ~/Library/Application Support/gramps/grampsdb

If user upgrades from 5.1 to 5.2, the config, database, and plugins are in the 5.2 equivalent of the 5.1 path, NOT the new install path.

2 Likes

We obtain the default base directories from the library calls:

GLib.get_user_data_dir()
GLib.get_user_config_dir()
GLib.get_user_cache_dir()

These can all be customised using environment variables. I don’t recommend changing the defaults though.

1 Like

Does it make sense to add another tab (complementing the existing About, Credits, License tabs) to the About dialog with this information? We could reference THAT feature instead of explaining the various OS path and version possibilities.

Note: these dirs are likely to be individually selected and copied for pasting into File Choosers. The highlighting to select the versioning data in the About tab is too fussy. (Particularly as your pointer approaches the beginning or end of the line!) Line-at-a-time selection is more appropriate than character-at-a-time for the dir paths.

1 Like

@emyoulation that does seem helpful in debugging unusual configurations, but running the macOS app package in debug mode (so that Python Eval is available) or installing SuperTool seem like big detours for someone who is just looking for the plugin directory or something, so I think I’ll first try to add the default paths and the possibility of backward compatibility to the manual, then verify one of the Python tools and link to your post for people in unusual situations.

Edit: and I see your excellent suggestion of adding a feature to Gramps to display paths, but I’ll add at least a bit to the manual for now and someone can gleefully delete it later when it’s obsoleted.

1 Like

That sounds like a plan.

Btw, your miniturized avatar makes it look as though you’re wearing a Batman cowl. So if you want to growl at a particular response, it wouldn’t be out of character.

Screenshot_20240906_124536_Chrome

@emyoulation I admit to liking the severe look of that shadow on my face, but, if you look closely, I’m holding a beer.

1 Like

I would surmise the main reason folks want to know where the relevant files are is because they probably want to move them. I’m going out on a limb here and guess …“to a shared drive like Dropbox so other family members can help contribute”?

I’m on OSX 14 / Gramps 5.2+ and thank God I found this thread. I can’t take another "~/Library/Application Support’ answer for the database location.

How do you move ‘the database’ into Dropbox? I moved ~/Library/Application Support/gramps/grampsdb folder to Dropbox and remapped the path to it via the prefs and indeed the Family data seemed to be intact, but when using the ‘manage database’ UI, the list was empty…so I don’t trust the process of moving just the one folder.

Don’t Gramps Desktop is only a single user application ( check the bugreports of other people trying and failing! ).

If you want to Share with other family members use Gramps Web and use the companion Gramps Web Sync Addon!

I believe Migration Assistant on macOS will bring folders in Application Support forward to a new machine. What about the hidden folders Gramps 5.2 is now using?

Craig

An old copy of Microsoft Word is a ‘single user application’, but saving files to Dropbox allows others to share access to the file, with the proviso that you don’t work on it at the same time. I don’t care if other folks have failed…other folks may be a “60 year old homemakers” and I’ve done enough stints as a programmer to know what may or may not be possible, especially with a SQLite based application, and at least worth an ask.

It stands to reason that Gramps, being a native, local app, works with a subset of “local files” and if those were moved to Dropbox, then others could access those files as if it was local to them as well.

But I’ll acknowledge that in today’s “distributed / open source” software world…its typical to rely on or have to deal with software in several locations on a drive so it didn’t surprise that only moving one folder didn’t quite do the trick initially, BUT that doesn’t preclude the ability to make it happen with the knowledge of how Gramps organizes and looks for the files it needs and that is what I was asking here.

Now all that being said, I am looking at Gramps Web, but the prospect of simply moving some files and instantly giving other family members access to the database was my first choice as it was the lowest hanging fruit (or so I’d hoped). There is some elegance is not having to ‘sign in’ or need web access to work on this stuff. I’ll bet a lot of us old-timers who remember the days of non-web/cloud based software still apperciate working that way. I will continue to look into Gramps Web of course…but still curious if, with 5.2 on OSX… there’s a mechanism to ‘share’ Gramps ‘working files’ on a shared drive (like Dropobox).

1 Like

Maybe not what you are looking for but I make the GRAMPS Backup on my
NAS (could be Dropbox) and therefore others can look at it if they have
GRAMPS but I would more recommend creating a NarrativeWeb Report on
Dropbox then they can safely access but not modify via their web browser
phil

1 Like

I don’t use Dropbox anymore, for a couple of reasons, but I have MEGA, which gives me way more free space, and also works well on Linux and Windows. And although modern Gramps is less sensitive than the old version, where your database was spread between multiple files, one for each table, and SQLite is supposed to be quite robust, I have seen problems with it. And such problems may occur when the cloud service and Gramps may both try to access your file at the same time. I’v seen this with RootsMagic, which is also SQLite based, where the file was corrupted by MEGA.

2 Likes

I suspect that in Gramps 5.2 on Linux, and in Gramps 5.2 built from source on macOS, database etc. directories have moved from ~/.gramps to ~/.local/gramps and ~/.config/gramps, just as they have in the Gramps 5.2 macOS app package. Can someone confirm?

(The new directories on Windows are already documented in the manual, and are also discussed in https://gramps.discourse.group/t/aio-move-of-user-directory-from-appdata-to-localappdata/4156/14.)

The default locations for these directories on my machine are:

~/.local/share/gramps
~/.config/gramps
~/.cache/gramps

1 Like

I revised Gramps 5.2 Wiki Manual - User Directory - Gramps to reflect this discussion, and made small updates in

Feel free to point out pages I missed, or if there’s anything I should do with regard to translation.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.