probonopd / go-appimage

Go implementation of AppImage tools
MIT License
680 stars 69 forks source link

Actions modification resulting in incompliant desktop file #220

Closed ctr49 closed 1 year ago

ctr49 commented 1 year ago

I could observe the following behavior with a Nextcloud AppImage and could not identify the problem to be related to the AppImage itself so I think go-appimage/appimaged is causing the issue:

Original desktop file has:

[Desktop Entry]
Categories=Utility;X-SuSE-SyncUtility;
Type=Application
Exec=nextcloud %u
Name=Nextcloud Desktop
Comment=Nextcloud desktop synchronization client
GenericName=Folder Sync
Icon=Nextcloud
Keywords=Nextcloud;syncing;file;sharing;
X-GNOME-Autostart-Delay=3
MimeType=application/vnd.nextcloud;x-scheme-handler/nc;
Actions=Quit;
[...]

However, the modified Actions line in the go-appimage-created desktop file reads:

[Desktop Entry]
Categories=Utility;X-SuSE-SyncUtility;
Type=Application
Exec=<path>/appimaged.AppImage wrap "<path>/Nextcloud-3.6.0-x86_64.AppImage" %u
Name=Nextcloud Desktop
Comment=<path>/Nextcloud-3.6.0-x86_64.AppImage
GenericName=Folder Sync
Icon=<path>/.cache/thumbnails/normal/5956fdd80355d96f01333cd9dc6e4b6f.png
Keywords=Nextcloud;syncing;file;sharing;
X-GNOME-Autostart-Delay=3
MimeType=application/vnd.nextcloud;x-scheme-handler/nc;
Actions=Trash;OpenPortableHome;CreatePortableHome;Extract;Show;Firejail;FirejailNoNetwork;FirejailPrivate;FirejailOverlayTmpfs;
[...]

lacking a Quit; action. As result, desktop-file-validate complains

appimagekit_5956fdd80355d96f01333cd9dc6e4b6f.desktop: error: action group "Desktop Action Quit" exists, but there is no matching action "Quit"

and there is an error when starting the application.

Tested with appimaged-718 (from continuous Build) and Nextcloud 3.6.0 appimage

probonopd commented 1 year ago

error: action group "Desktop Action Quit" exists, but there is no matching action "Quit"

These tests are done by https://gitlab.freedesktop.org/xdg/desktop-file-utils.

If you think that the error is by mistake, please open an issue there. Thanks!

ctr49 commented 1 year ago

I'm not saying that the the tests are wrong, but that there is an issue with go-appimage rewriting of the Actions. Quit is indeed missing in the desktop file while it is present in the application.

probonopd commented 1 year ago

Ok, thanks for the clarification. Then it is a bug here. Would you be able to send a fix as a pull request?