Skip to content

Update browser launching to include Exec args - #3840

Closed
trap0xcc wants to merge 1 commit into
omacom:devfrom
trap0xcc:dev
Closed

trap0xcc wants to merge 1 commit into
omacom:devfrom
trap0xcc:dev

Conversation

@trap0xcc

Copy link
Copy Markdown

When launching the default browser, there is a sed that pulls out the binary's exec path. This drops all arguments, presumably to remove the %U present. This Change updates these scripts to include any args in the Exec line, while still ignoring the %U if present.

When launching the default browser, there is a sed that pulls out the binary's
exec path. This drops all arguments, presumably to remove the %U present. This
Change updates these scripts to include any args in the Exec line, while still
ignoring the %U if present.
@trap0xcc

Copy link
Copy Markdown
Author

For some context, this was useful for me as I configured a user local chromium.desktop that has a --proxy-pac-url arg specified that I wanted applied to all browser launching in Omarchy.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thank you for this, @trap0xcc. The bug is real, and this was the first PR to fix it: the launchers keep only the first word of the default browser's Exec= line, which drops flags and cuts wrappers like env VAR=x app or flatpak run … down to their first word. It is tracked in #11718.

On a worker, a browser that records its arguments confirmed the bug and that this change passes flags through, but three problems remain. A lowercase %u is not stripped, so stock Firefox (Exec=/usr/lib/firefox/firefox %u) is handed a literal %u. The line is expanded unquoted, so an argument containing a space is split in two and wildcards are expanded against filenames. And private-mode detection reads the flags too, so a proxy URL containing "edge" picks Edge's private flag for Chromium. The branch is also well behind dev and no longer merges.

The newer PRs against quattro parse the whole Exec line: #11728, #12533, #13240 and #13241. Closing in favour of that work, at the maintainer's request.

Reviewed by Claude Opus 5.5, with the reproduction run on a worker, and by Codex Medium, which found the quoting and private-mode problems, both confirmed against the branch.

@omarchybot omarchybot closed this Sep 27, 2026
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
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.

2 participants