-
Notifications
You must be signed in to change notification settings - Fork 273
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
Untrusted desktop entry file (escaping issue) #170
Comments
That's quite odd, first time I see it. How can we make it "trusted"? Hasn't it been marked as executable? |
Hmm.... I cannot reproduce for https://github.com/AkashaProject/Community/releases/download/0.7.2/AKASHA-0.7.2-x86_64.AppImage, maybe something wrong with AppImage generated by electron-builder. |
Can you post a link to your "broken" AppImage? I'll have a look. By the way, talking bout new projects, check out https://github.com/TheAssassin/appimagelint/. |
Everything is ok except |
Good. There's no desktop file check yet, unfortunately, but I will add one soon-ish. That'll be quite useful to you, since you don't use appimagetool, which comes with some checks. |
According to some StackOverflow issues, this dialog goes away when a desktop file is marked executable. That's what AIL is supposed to do. I will test this nevertheless on Ubuntu 18.04. |
@TheAssassin Still, something is wrong or in electron-builder AppImage, or in AppImageLauncher, because I don't see "Open with AppImageLauncher" in context menu. I will investigate next week. |
Strange, seems right over here:
Can you please run the second command and check whether AIL's MIME type definitions at least work? Might be a bug in Ubuntu's desktop, and we need to update some caches or so. |
Reported correctly, but still no option in menu :) |
I updated to AppImageLauncher v1.3.1. There is an option in context menu if I download via firefox. Still, app is not added to menu. And in the generated desktop file I see
but from what I know, spaces for TryExec must be escaped with and spaces in
after these fixes to generated desktop file (and making it trusted), app can be run. |
Interesting. Not that it'd excuse the failure, but why bother using spaces in paths at all? I'll have to test that later again. |
update: it seems AppImageLauncher uses file name as app name instead of name in a desktop file :( |
Yes, that's the idea.
Of course, as I stated in my last comment, this shall not be an excuse for broken behavior. Was just a bit curious why people auto-generate filenames with spaces, given all the issues they regularly produce. |
@TheAssassin Default artifact pattern for AppImage uses space.
in electron-builder 21 it is changed.
|
Let me clarify I don't insist on filenames being spaceless, that's really not the case here. Just was a bit curious there. Our tools also embed spaces in generated filenames if e.g., the desktop file contains spaces. |
Seems like it's the Therefore:
@develar it would be really helpful if you could verify my findings. Just put quotes around the |
I have enough experience in this area, so, I can fully confirm, that:
I already did it :) This change in electron-builder was driven by a fact, that I cannot figure out how to generate escaped So, not clear what I should confirm — it is clear that right now AppImageLauncher can generate unescaped Exec and TryExec and it leads to a critical bug, that you don't see app in menu (because Desktop file is invalid) and cannot run it. electron-builder always produces desktop file Exec=AppRun (and don't set TryExec anymore, because it is AppImageLauncher responsibility now). |
I can confirm that AppImageLauncher and electron-builder 21+ produced AppImage are ready for production use.
So, thanks a lot of for AppImageLauncher, it works. You can close this ticket and open a new one about escaping spaces in Exec/TryExec. I assume "Untrusted desktop entry file" related to weird Ubuntu bugs because of file permissions/whatever (when you copy file from macOS to Linux desktop). Regular users will download AppImage file from web. |
Well the core bug hasn't been resolved yet, we still don't escape things properly yet. We must fix that, but it's not as much of a prio, I guess. I do not necessarily have to need to escape spaces in |
Exec entries scaping is supported on xdg-utils-cxx see: But it's not used on AIL as far as I know. |
libappimage 1 will be used soon-ish, since I plan to make the change with version 2.0. See the milestone above. |
Should be resolved since #214. |
Version: v1.2.2
Linux 4.18.0-22-generic #23~18.04.1-Ubuntu SMP Thu Jun 6 08:37:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Just run AppImage, accept to integrate it, and... no launcher in menu.
The text was updated successfully, but these errors were encountered: