You are not logged in.
Firefox 147.0 release notes claim it now supports XDG base dir spec:
Firefox now supports the Freedesktop.org XDG Base Directory Specification.
But the default behavior is to use the legacy .mozilla directory, if it exists.
Has anyone migrated firefox to the new spec, and could share a way to do it that preserves my browser profile and browsing session? Thanks.
Offline
Close Firefox, then (assuming default XDG dirs):
mv ~/.mozilla ~/.config/mozillaAnd of course it's a good idea to have a backup in case anything goes wrong.
Offline
What about the cache, shared data, and state directories? Firefox is a complex application that could conceivably use all of those, but those functions previously were all ensconced in the mozilla dir.
Is it really accurate for 147 to just mv .mozilla to .config/mozilla?
Offline
Why don't you try it yourself? Rename/move your current .mozilla directory, launch Firefox so that it starts a fresh profile, and see which XDG directories it actually uses.
Spoiler: it's .config and .cache, but .cache was used for a long time already. So in effect the "XDG Base Directory Specification support" is just an alternate path for the main .mozilla directory; no split of shared/state data was implemented.
Actually, it seems the migration is not officially supported:
https://bugzilla.mozilla.org/show_bug.cgi?id=259356
(…) there is no migration path supported at this point: only new profiles are expected to use the new setup. Migrating manually is at your own risk, make a backup before.
I just simply moved the directory and had 0 issues, but of course YMMV.
Offline
You can go in address bar to about:support and see what directories are used for config (at the begining of page) and for cache (at bottom of page).
When (and if) you move your .mozilla directory to .config you can see there if it's used.
BTW I read somewhere in mozilla bugzilla that some firefox addons may not support new XDG .config/mozilla directory and don't work.
I will stay with old dir as long as I can.
Last edited by xerxes_ (2026-01-24 17:37:33)
Offline
Actually, it seems the migration is not officially supported: https://bugzilla.mozilla.org/show_bug.cgi?id=259356
That bug also has a comment that suggests using firefox Sync:
The preferred way to move to the new behavior would be to ensure Sync is setup, get rid of the legacy directory (make a backup just in case) and starting again the browser. A new profile should be created in the XDG_CONFIG_HOME hierarchy and then you can bring back things.
I tried this and it reinstalls some extensions, but can't seem to restore my browsing session with synced tabs, unless there's something more I need to do to re-open those tabs. I'll try again later and see if I can get it to work.
Offline