Repository navigation
Webapps: make browser selection configurable (webapp-level default + per-app override) #8444
Replies: 1 comment
|
Strong +1, and a data point on the failure mode that I think strengthens the case. There's a sharper edge than "your webapp browser is your system browser or Chromium": if your default is outside the allowed list and The exec setsid uwsm-app -- --app="https://my-app.com"
A lighter workaround than editing the scriptFor anyone landing here from #2468: you don't have to patch sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browserSo a user-level shim at the fallback name wins, and nothing shipped gets touched: # ~/.local/share/applications/chromium.desktop
[Desktop Entry]
Type=Application
Name=Chromium (shim to Brave)
Exec=/usr/bin/brave
NoDisplay=trueLibreWolf stays the default browser for links, web apps run in Brave with That's really an argument for level 2 in your proposal: the reason people reach for these hacks is that there's no supported way to say "web apps use browser X." Even without the per-app override, a webapp-level default would remove the need for all of it. Written with the help of Claude Code; the trace and shim are from my own machine. |
Uh oh!
There was an error while loading. Please reload this page.
The problem is one line
omarchy-launch-webappdecides which browser runs every webapp in a single hardcoded step:There is no way to influence this. Not per install, not per app, not globally. Your webapp browser is your system browser, or it is Chromium.
What people already do about it
Discussion #2468 — "Using Firefox as the WebApp Browser in Omarchy" — has 38 upvotes and 22 comments, and it is a tutorial for editing
omarchy-launch-webappby hand.That thread is the evidence. Users are not asking for a feature in the abstract; they are patching a shipped script, and paying for it on every update:
Parallel copies of a core script, maintained by hand, because there is no extension point. That is the actual cost of the missing setting.
Proposal: three levels, each falling back to the one above
1. System default —
xdg-settings get default-web-browser. Exists today, stays the default.2. Webapp default — one setting that says "webapps use browser X", independent of the system browser. This is the level that is missing entirely, and the one that covers most of #2468: keep Firefox as your everyday browser, run webapps in Chromium — or the reverse.
3. Per-app override — the browser is a property of the individual webapp, chosen at install time and stored in its
.desktop.Level 3 is not speculative. Linux Mint's WebApp Manager has shipped it for years: each generated
.desktopcarries anX-WebApp-Browserfield, and theExecline invokes that browser directly. You pick the browser per app in the UI, next to the name and the icon.Concretely, that lets a user run WhatsApp in Brave, Claude in Chromium, and ChatGPT in Chrome — separate browsers, separate extension sets, separate managed policies — without touching the system default.
This overlaps PR #4749 and should be designed with it
PR #4749 (
--isolate, from discussion #6250) adds--user-data-dir=to the sameexecline to give a webapp its own process tree.Both changes edit the same two lines, and they interact: profile flags are browser-specific. Chromium-family browsers take
--profile-directory/--user-data-dir; Firefox takes-P. Today--profile-directory=Defaultsits in the.desktopExec, which silently assumes the browser will always be Chromium-family — an assumption that stops holding the moment the browser becomes selectable.So the underlying fix for both is the same:
omarchy-launch-webappcurrently resolves browser, profile and flags inline, with no seam. Give it a per-browser launch adapter — one that knows how each family expresses "this URL, in its own window, with this profile" — and--isolateand browser selection both become small changes on top of it instead of two patches fighting over the same line.Caveat, stated up front
Firefox has no
--appmode. It works as a webapp browser through a different path — dedicated profile via-P,--new-window,--class, plus userChrome.css to hide the UI — which is exactly what #2468 documents. Any per-app browser support has to treat "how do I launch a bare window for this URL" as per-browser behavior, not a shared flag string. That is an argument for the adapter, not against the feature.Threads this would consolidate
Six threads over more than a year, all landing on the same hardcoded browser lookup. Worth fixing as one seam rather than six special cases.
All reactions