Web app installer writes an unquoted URL to Exec=, producing an invalid .desktop for URLs with a query string
What happened
omarchy-webapp-install does not quote the URL when writing the Exec= key, so any web app whose URL contains a query string produces a .desktop file that violates the freedesktop Desktop Entry spec. ? is a reserved character and must appear quoted.
The launcher still works under most launchers, so the breakage is silent — it only surfaces when the file is validated or read by a stricter implementation.
What I expected
A .desktop file that passes desktop-file-validate, regardless of the URL's query string.
Steps to reproduce
omarchy-webapp-install "ZZ Repro Test" "https://example.com/page?a=b" "firefox"
grep '^Exec=' ~/.local/share/applications/"ZZ Repro Test.desktop"
desktop-file-validate ~/.local/share/applications/"ZZ Repro Test.desktop"
Result:
Exec=omarchy-launch-webapp https://example.com/page?a=b
/home/user/.local/share/applications/ZZ Repro Test.desktop: error: value
"omarchy-launch-webapp https://example.com/page?a=b" for key "Exec" in group
"Desktop Entry" contains a reserved character '?' outside of a quote
Exit code 1. Quoting the URL by hand makes it pass with exit 0:
Exec=omarchy-launch-webapp "https://example.com/page?a=b"
Suggested fix
In omarchy-webapp-install, the default exec string interpolates the URL bare:
EXEC_COMMAND="${CUSTOM_EXEC:-omarchy-launch-webapp $APP_URL}"
Quoting the URL is enough — omarchy-launch-webapp already handles its argument as "$1":
EXEC_COMMAND="${CUSTOM_EXEC:-omarchy-launch-webapp \"$APP_URL\"}"
Side note
The same generated file also trips a desktop-file-validate warning because Comment= is set to the same value as Name=. Cosmetic, and separate from the error above — happy to open a second issue if you'd prefer it tracked separately.
System
- Omarchy: 4.0.1-1
- Kernel: 7.1.9-arch1-2
- CPU: Intel Core i9-10900K
- GPU: NVIDIA GA102 [GeForce RTX 3080]
- desktop-file-utils: 0.28-1
- bash: 5.3.15(1)
Fixed in 4.0.2 — closing.
I filed this against 4.0.1 minutes before updating; desktop_exec_arg() now quotes the URL per the Exec spec. Verified with the exact repro above:
$ omarchy-webapp-install "ZZ Repro Test" "https://example.com/page?a=b" "firefox"
$ grep '^Exec=' ~/.local/share/applications/"ZZ Repro Test.desktop"
Exec=omarchy-launch-webapp "https://example.com/page?a=b"
$ desktop-file-validate ~/.local/share/applications/"ZZ Repro Test.desktop"
→ exit 0
Sorry for the noise. The Comment= / Name= warning from the side note is still there, but it is cosmetic — happy to open a separate issue only if you want it tracked.