Add native Zen Browser support - #408
Open
agats wants to merge 2 commits into
Open
Conversation
Zen Browser is a Firefox-based browser distributed as a native binary (e.g. via AUR's zen-browser-bin, or upstream's own installer/tarball) in addition to the Flatpak build (app.zen_browser.zen) already supported as BROWSER_TYPE_ZEN_FLATPAK. Register it using the generic BROWSER_TYPE_FIREFOX type, the same way LibreWolf, Waterfox, and Floorp are registered for their native builds, so it gets an isolated profile created the standard Firefox-family way.
Each webapp gets its own fresh, isolated Firefox-family profile. For Zen specifically, a fresh profile normally triggers Zen's welcome/setup screen on first launch. Setting zen.welcome-screen.seen=true in the shared profile template avoids that. This pref is Zen-specific and harmless (ignored) for the other Firefox-family browsers that share this same template.
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.
Summary
Adds native (non-Flatpak) Zen Browser support as a target browser.
Zen support currently only covers the Flatpak build (
BROWSER_TYPE_ZEN_FLATPAK, added in #336). Users who install Zen natively — e.g. via AUR'szen-browser-binon Arch, or Zen's own installer/tarball — have no matching entry, even thoughos.path.exists(browser.test_path)is the only gate the GUI applies.Zen is a Firefox fork and behaves identically to the other native Firefox-family entries already in this list (LibreWolf, Waterfox, Floorp) for the purposes of webapp-manager's profile handling, so this reuses the existing
BROWSER_TYPE_FIREFOXtype rather than adding a new one — each webapp gets its own isolated profile the same way native Firefox/LibreWolf/Waterfox/Floorp webapps already do, with zero new branching logic required.The welcome-wizard problem, and how this avoids it
A fresh, empty Firefox-family profile normally triggers Zen's first-run welcome/setup screen. Left unaddressed, that would pop up on every newly created Zen webapp — see the discussion on #335, where a workaround gist (linked below) works around this by sharing one profile across all Zen-native webapps, sacrificing the per-app isolation that's the whole point of this being a "web app" in the first place, and requiring manual one-time setup (create a profile via
about:profiles, hand-edit a hardcoded path intocommon.py).This PR fixes the actual cause instead of working around it: setting
zen.welcome-screen.seen=truein the shared profile template (usr/share/webapp-manager/firefox/profile/user.js) suppresses the wizard directly. This pref is Zen-specific and silently ignored by every other Firefox-family browser that shares this same template, so it's a no-op for Firefox/LibreWolf/Waterfox/Floorp. Net effect: full per-app profile isolation, preserved, with no manual setup required and no wizard interruption.Related
--class WebApp-<codename>the same as every other native Firefox-family entry, and I have not observed the icon-grouping issue with it.Testing
Verified locally on Arch Linux (
webapp-manager1.4.6) withzen-browser-bin(native, non-Flatpak Zen install):~/.local/share/ice/firefox/<codename>/, no shared state between apps.user.jschange.