Skip to content

Commit 4bf5939

Browse files
authored
linux: Fix Zed not visible in "Open With" list in file manager for Flatpak (#21177)
- Closes #19030 When `%U` is used in desktop entries, file managers pick this and use it: - When you right-click a file and choose "Open with..." - When you drag and drop files onto an application icon <img src="https://github.com/user-attachments/assets/ea5aa008-b81c-4f10-9302-b82332f6b174" width="200px" alt="image"> Adding it to CLI args, changes Flatpak desktop entry `Exec` from: ```diff - Exec=/usr/bin/flatpak run --branch=master --arch=x86_64 --command=zed dev.zed.ZedDev --foreground + Exec=/usr/bin/flatpak run --branch=master --arch=x86_64 --command=zed --file-forwarding dev.zed.ZedDev --foreground @@U %U @@ ``` This is Flatpak's way of doing `%U`, by adding `--file-forwarding` and wrapping arg with `@@u` and `@@`. Read more below ([source](https://docs.flatpak.org/en/latest/flatpak-command-reference.html)): > --file-forwarding > > If this option is specified, the remaining arguments are scanned, and all arguments that are enclosed between a pair of '@@' arguments are interpreted as file paths, exported in the document store, and passed to the command in the form of the resulting document path. Arguments between "@@U" and "@@" are considered URIs, and any "file:" URIs are exported. The exports are non-persistent and with read and write permissions for the application. Release Notes: - Fixed Zed not visible in the "Open with" list in the file manager for Flatpak.
1 parent aea6fa0 commit 4bf5939

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/zed/resources/flatpak/manifest-template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"BRANDING_LIGHT": "$BRANDING_LIGHT",
3333
"BRANDING_DARK": "$BRANDING_DARK",
3434
"APP_CLI": "zed",
35-
"APP_ARGS": "--foreground",
35+
"APP_ARGS": "--foreground %U",
3636
"DO_STARTUP_NOTIFY": "false"
3737
}
3838
},

0 commit comments

Comments
 (0)