Skip to content

Fix omarchy-launch-browser crashing Chrome when man-db is absent - #12841

Open
AyanMulla09 wants to merge 1 commit into
omacom:quattrofrom
AyanMulla09:fix/launch-browser-help-probe-crash
Open

AyanMulla09 wants to merge 1 commit into
omacom:quattrofrom
AyanMulla09:fix/launch-browser-help-probe-crash

Conversation

@AyanMulla09

Copy link
Copy Markdown

Summary

  • omarchy-launch-browser decided the private-mode flag by running the default browser with --help and grepping the output for MOZ_LOG.
  • Chrome's --help execs man to show its manual page instead of printing to stdout. On an image without man-db, that exec fails with ENOENT and Chrome dies with SIGTRAP before the browser it was asked to launch even starts. 2>/dev/null hides the failure, so the crash looks unrelated to the launcher.
  • Switched detection to the executable name, the same approach already used for the Edge branch right below it, so no subprocess runs at all.

Fixes #12564

Test plan

  • Added a regression case to test/shell.d/launch-browser-test.sh with a mock browser that fails on --help (mirroring the man-db-less Chrome crash) and asserts --help is never invoked. Confirmed it fails against the unpatched script and passes with the fix.
  • Ran test/shell.d/launch-browser-test.sh directly — all cases pass.
  • Ran the full test/shell suite; the same 5 files fail on a clean quattro checkout with no changes, so they're unrelated to this fix.

Private-mode flag detection ran the default browser with --help and
grepped for MOZ_LOG. Chrome's --help execs man to show its manual
page; on an image without man-db that exec fails with ENOENT and
kills Chrome with SIGTRAP before it ever launches, with the crash's
stderr silently discarded.

Detect the flag from the executable name instead, the same way the
Edge branch already does, so no subprocess is run at all.

Fixes omacom#12564

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@llstrk

llstrk commented Sep 21, 2026

Copy link
Copy Markdown

One private-mode compatibility regression remains in the new browser-name list.

Verified: removing the --help probe eliminates the unwanted browser subprocess. The new regression test passes on this head and fails against the baseline launcher at the no-probe assertion.

Preserve Waterfox's private-window flag

With Exec=waterfox %u as the default browser, omarchy-launch-browser --private now selects Chromium's flag. Captured production-launcher arguments with synthetic browser and desktop stubs:

                      Baseline                 PR head
Waterfox --private    waterfox --private-window waterfox --incognito
Browser help probes   1                        0

Waterfox's shipped private desktop action uses --private-window. Its help output contains the MOZ_LOG marker used by the baseline detector.

Impact: the private-window request is lost for Waterfox users. Its command-line handler ignores the unknown --incognito flag and skips the following argument. Under ordinary, non-permanent-private settings, this falls back to normal browsing; a URL placed after the flag can also be discarded. These browser consequences are source-supported, not live-UI observations.

Suggested change: retain non-probing detection, include waterfox in the Firefox-family mapping, and assert that a Waterfox --private launch records --private-window. This preserves compatibility without restoring the crashing help probe.


Review information

Test scope: head edb2c89067306e686a01f91551d775fd70516593 against merge-base 8f324c90b82790d31ab33565441e07cbdb8d2308. Targeted shell tests and independent mocked launch-argument matrices; Chromium's real binary also reproduced the missing-man help failure. No live Waterfox windows or full shell suite were tested.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Astra initial source inspection, independent Fable 5.1 and separate Astra reviews, followed by verification of the reported claims against targeted evidence.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for tracking this down. The bug is real and still on quattro: bin/omarchy-launch-browser:9 still runs $browser_exec --help, which on Chrome and Brave execs man and dies with SIGTRAP when man-db is missing (#12564, and #8897 for Brave).

Three open pull requests fix it: this one, #9128 and #11455. I compared their diffs against current quattro, and #9128 is the one to bring forward:

One part of #9128 is a product decision rather than a fix. When the browser is not in its list and --private is passed, it stops with an error, where today it falls back to --incognito. That choice is the maintainer's.

What was checked: the three diffs, read against quattro at 821ae58. I ran nothing on a worker, because a fix that is not going forward is not worth verifying. There was no second opinion: the configured reviewer, Codex Medium, answered a ping, but today's review budget was already spent, so this comparison is one model's (Claude Opus 5.5).

Next: the maintainer chooses between the three. Nothing is needed from you unless they ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-launch-browser crashes Chrome when man-db is absent: --help probe execs man and dies with SIGTRAP

3 participants