Fix/firefox esr profiles#1179
Open
4in4in wants to merge 3 commits into
Open
Conversation
…rofiles.ini - Add ~/.mozilla/firefox-esr to the profile dir candidates so Debian/Ubuntu firefox-esr installs are detected. - check_profile_ini no longer aborts on the first candidate dir that lacks profiles.ini. It now keeps only dirs that actually contain profiles.ini and errors only when none do. This fixes a failure on KDE/Kubuntu where plasma-browser-integration pre-creates empty ~/.var/app/io.gitlab.librewolf-community/.librewolf native-messaging-hosts stubs (no flatpak/librewolf required), which previously aborted install with "Unable to find profiles.ini".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the PR
install.shfailed on a fresh Kubuntu (KDE Plasma 6.x) install with firefox-esr:There is no Flatpak and no LibreWolf on the machine, yet the script aborts pointing at a LibreWolf path. Two independent problems cause this:
firefox-esr profile dir was not in the candidate list. On Debian/Ubuntu the
firefox-esrpackage stores its profile in~/.mozilla/firefox-esr/(not~/.mozilla/firefox/), so the profile was never found.check_profile_iniaborted on the first existing candidate dir withoutprofiles.ini. It required every existing candidate dir to containprofiles.iniandexit 1-ed on the first one that didn't — even though a perfectly valid profile dir was also present.Why that LibreWolf dir exists without Flatpak
On KDE Plasma 6.x,
plasma-browser-integrationships aflatpak-integratorcomponent (the "Plasma Browser Integration Flatpak Integration" background service) that pre-creates native-messaging-host directories for a hardcoded list of Flatpak browsers — even when neither Flatpak nor that browser is installed. The browser list and target path come straight from its source (flatpak-integrator/plugin.cpp):{BrowserBase::Firefox, u"org.mozilla.firefox"_s, u"/.mozilla/native-messaging-hosts"_s}, {BrowserBase::Firefox, u"io.gitlab.librewolf-community"_s, u"/.librewolf/native-messaging-hosts"_s}, // path: QDir::homePath() + "/.var/app/" + browser.id // comment: "always create integration regardless of the browser being installed // so we can be ready for if it is installed"So
~/.var/app/io.gitlab.librewolf-community/.librewolf/is created as an empty stub (noprofiles.ini). It passes the existing-dfilter incheck_profile_dir, then abortscheck_profile_ini. This component is new in Plasma 6.x (Debian/Ubuntuplasma-browser-integration~6.3.x); Plasma 5.27 is unaffected, which is why this surfaces on recent KDE distros.Changes
~/.mozilla/firefox-esrtofirefoxProfileDirPaths.check_profile_initolerant: keep only the dirs that actually containprofiles.ini, and error out only when none do. Dirs withoutprofiles.ini(e.g. the KDE stub) are now skipped instead of being fatal, and each skip is logged via a new non-fatallepton_warn_messageso the behavior is visible:No behavior change for setups that already worked: a single valid profile dir still passes exactly as before.
PR Type
Add:Add feature or enhanced.Fix:Bug fix or change default values.Clean:Refactoring.Doc:Update docs.Related Issue
Screenshots
Not applicable (install script change).
Additional context
Reproduction: fresh Kubuntu with the default Plasma 6.x desktop (
plasma-browser-integrationinstalled) +firefox-esr, no Flatpak. Tested on a real system — install now detects~/.mozilla/firefox-esr, skips the empty KDE stub dir with a warning, and applies the theme correctly.References: