New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with desktop file and xdg-open on Linux #24
Comments
Weird - I get the same behavior. It turns out edit: It looks like this is actually failure on part of command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
command="`which "$command"`"
... Seems like it wants to interpret those as literal quotes. Can't tell if it doesn't support quoting those fields, or if there's some weird issue. edit again: Did some digging on this - perhaps it's |
Yes, looks like they went through the same thought process as me. The spec seems to indicate that it should be fine, but it isn't.. I did a quick experiment to see how spaces in file paths can be handled. Looks like if there's a space you just have to escape it with a backslash, which is the normal alternative to using quotes. E.g. So does electron-builder not have the functionality to perform this escaping when creating desktop files? Admittedly xdg-utils' behaviour is clearly broken, but I'm surprised electron-builder uses quotes when it straight up doesn't even work with xdg-utils. I think I'm gonna go open an issue upstream with xdg-utils and see how that goes. Seems like they track issues on their GitLab source mirror. EDIT: Done, feel free to go give it a thumbs up 😉 https://gitlab.freedesktop.org/xdg/xdg-utils/issues/151 |
Yeah, I guess ideally I'll leave this issue open until something happens somewhere upstream. |
electron-userland/electron-builder#2759 (comment) This is fixed since we use 22.8.0+ now. |
The path to the AppImage file in the Exec field of the desktop file is wrapped in quotes, which causes errors such as the following when using xdg-open:
which: no Slippi-Launcher-1.4.4-x86_64.AppImage" in (./"/home/haystack/source)
This makes it so you cannot open .slp files from the Slippi site in your browser because the URL handling is done by xdg as well. Opening opening a .slp file from a file browser will also most likely be broken by this although it may depend on your file browser.
If I manually remove the quotes in the Exec field of the desktop file, then it works fine and the slippi:// URLs are handled properly and I can open the files directly with xdg-open as well.
The spec seems to imply that it should be fine to double quote the path, so I'm not entirely sure why it doesn't work. Could possibly be an upstream bug in xdg-utils.
For debugging purposes, here's the generated desktop file (
~/.local/share/applications/appimagekit-slippi-desktop-app.desktop
):The text was updated successfully, but these errors were encountered: