Bug 2431665

Summary: ~/.mozilla/extensions directory still created
Product: [Fedora] Fedora Reporter: pkoz <peter.kozich>
Component: firefoxAssignee: Martin Stransky <stransky>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 43CC: dust.pseudonym, gecko-bugs-nobody, jhorak, klaas, rstrode, sajberkod, stransky, suraj.ghimire7, zomcd.rhbz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: firefox-147.0.1-5.fc43 firefox-147.0.2-1.fc42 firefox-147.0.2-2.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-01-27 12:48:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description pkoz 2026-01-21 15:53:57 UTC
firefox 147.0.1 has been verified on ubuntu not to create the ~/.mozilla/extensions directory if firefox profile is under ~/.config/mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=2001887#c24

I use firefox-147.0.1-2.fc43.x86_64, and it still creates ~/.mozilla/extensions whenever I start it. firefox then works all right based on its profile under ~/.config/mozilla.

What am I missing?

Reproducible: Always

Comment 1 Lucas 2026-01-22 00:44:08 UTC
The same bug happens on my side regardless of whatever it is in a new fedora profile or not. 
I am using Fedora 43 KDE and native 147.0.1 firefox.

Comment 2 Martin Stransky 2026-01-27 09:37:16 UTC
Yes, the file is created by language pack install script at /usr/bin/firefox.

Comment 3 pkoz 2026-01-27 12:11:59 UTC
Thanks for the hint. In ubuntu, they probably do it differently.

Isn't it possible to improve the /usr/bin/firefox script so that it first tries the XDG directory (which defaults to ~/.config/mozilla) and if not found then falls back to the traditional ~/.mozilla?

Comment 4 Martin Stransky 2026-01-27 12:38:34 UTC
Added to firefox-147.0.1-5 package.

Comment 5 pkoz 2026-01-27 12:48:34 UTC
Thank you so much. Then I am closing this one.

Comment 6 Fedora Update System 2026-01-27 19:09:04 UTC
FEDORA-2026-4d2a7298e1 (firefox-147.0.1-5.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-4d2a7298e1

Comment 7 Fedora Update System 2026-01-27 19:09:05 UTC
FEDORA-2026-b870bff523 (firefox-147.0.1-5.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-b870bff523

Comment 8 Fedora Update System 2026-01-28 00:53:03 UTC
FEDORA-2026-4d2a7298e1 (firefox-147.0.1-5.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2026-01-28 01:52:56 UTC
FEDORA-2026-b870bff523 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-b870bff523`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-b870bff523

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2026-01-28 11:53:52 UTC
FEDORA-2026-8283a41c2a (firefox-147.0.1-6.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8283a41c2a

Comment 11 pkoz 2026-01-28 19:00:52 UTC
Confirmation: with firefox-0:147.0.1-5.fc43.x86_64, the extension directory is created as expected, under the ~/.config/mozilla directory if such exists.

Comment 12 Fedora Update System 2026-01-30 16:06:47 UTC
FEDORA-2026-8165773b54 (firefox-147.0.2-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8165773b54

Comment 13 Fedora Update System 2026-02-03 03:27:24 UTC
FEDORA-2026-d7d488beb4 (firefox-147.0.2-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2026-02-03 07:46:54 UTC
FEDORA-2026-ecf98bfc3e (firefox-147.0.2-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ecf98bfc3e

Comment 15 Fedora Update System 2026-02-03 15:35:15 UTC
FEDORA-2026-ecf98bfc3e (firefox-147.0.2-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 zomcd.rhbz 2026-03-05 15:41:57 UTC
Hi, the firefox launch script hardcodes its config location to ~/.config which does not play well if XDG_CONFIG_HOME is set to a different folder. It would be nice if it read XDG_CONFIG_HOME if set and fallback to ~/.config.

A small fix for /usr/bin/firefox (that I unfortunately have been unable to test)

if [ -d "$HOME/.mozilla" ]; then
 MOZ_CONFIG_DIR="$HOME/.mozilla"
else
 MOZ_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/mozilla"
fi
MOZ_EXTENSIONS_PROFILE_DIR="$MOZ_CONFIG_DIR/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
# ...
(restorecon -vr $MOZ_CONFIG_DIR/firefox/*/gmp-widevinecdm/* &)

Comment 17 sajberkod 2026-03-06 23:16:26 UTC
Can confirm, this bug is still present. Firefox keeps creating .mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} folder

Comment 18 pkoz 2026-03-07 14:02:17 UTC
(In reply to sajberkod from comment #17)
> Can confirm, this bug is still present. Firefox keeps creating
> .mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} folder

I moved ~/.mozilla to ~/.config/mozilla (i.e. I haven't ~/.mozilla any longer), and the extensions directory is created under my ~/.config/mozilla, which is I believe the intended behavior. To get rid of that extensions directory, some env variable has to be set to disable something in firefox, I forgot what was that exactly.

The original bug was about ~/.mozilla getting recreated, but that has been fixed.

I use this:
$ rpm -q firefox
firefox-148.0-1.fc43.x86_64

Comment 19 Martin Stransky 2026-04-03 09:03:48 UTC
Do you mind to attach a patch for /usr/bin/firefox? I'll add it to rpm then.
Thanks.

Comment 20 pkoz 2026-04-03 09:48:47 UTC
(In reply to Martin Stransky from comment #19)
> Do you mind to attach a patch for /usr/bin/firefox? I'll add it to rpm then.
> Thanks.

This is addressed to the author of comment #16, right?
Now I see that the author of comment #17 might have the same problem as that in comment #16.
As for myself, I don't use explicitly XDG_CONFIG_HOME.