Skip to content

fix(deep-link): remove quotes from Exec path in .desktop file on Linux (fix tauri-apps/tauri#10570)#3374

Open
0xPxt wants to merge 1 commit intotauri-apps:v2from
0xPxt:fix/deep-link-linux-exec-quoting
Open

fix(deep-link): remove quotes from Exec path in .desktop file on Linux (fix tauri-apps/tauri#10570)#3374
0xPxt wants to merge 1 commit intotauri-apps:v2from
0xPxt:fix/deep-link-linux-exec-quoting

Conversation

@0xPxt
Copy link
Copy Markdown

@0xPxt 0xPxt commented Apr 1, 2026

The register() function wraps the Exec path in literal double quotes when generating .desktop files on Linux:

let qualified_exec = format!("\"{}\" %u", exec);
// produces: Exec="/usr/bin/kunobi" %u

Per the freedesktop Desktop Entry Spec, Exec values are not shell-parsed — the quotes become part of the binary path. When xdg-open handles a deep link URL, it extracts the first token (including the literal " characters) and fails to find it:

$ XDG_UTILS_DEBUG_LEVEL=2 xdg-open "myapp://callback"
/usr/bin/xdg-open: 811: : Permission denied

Removing the quotes fixes deep link delivery on Linux.

Intended to resolve tauri-apps/tauri#10570

@0xPxt 0xPxt requested a review from a team as a code owner April 1, 2026 14:22
@FabianLars
Copy link
Copy Markdown
Member

Intended to resolve tauri-apps/tauri#10570

I doubt it helps. The quotes were added a month ago. This issue is 2 years old.

Now you're not the first one (unless you were the one on discord) to report having issues with the quotes but they were added because we had issues with paths with spaces.
desktop-file-validate also does not complain about the quotes.
The linked spec also says the following

Arguments may be quoted in whole. If an argument contains a reserved character the argument must be quoted. The rules for quoting of arguments is also applicable to the executable name or path of the executable program as provided.

Looks like this is a bug in xdg-open https://gitlab.freedesktop.org/xdg/xdg-utils/-/work_items/151 - we should double check that spaces are broken (i'll try to get the repro that prompted us to add the quotes) and then maybe set the quotes only if we detect quotes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Deep links doesn't open app on linux

2 participants