AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

If the AppImage has space in the name, some desktop enviornments won't pick up the entire name. #159

Open efindus opened 2 years ago

efindus commented 2 years ago

On this line the Exec path is set to the AppImage path without any quotes so some DEs (like KDE Plasma) won't pick up the entire name (if the filename has any spaces within it), so the desktop file will fail to launch. The problem should be solved just by adding " to both sides of the Exec path (and possibly escaping any within the path).

azubieta commented 2 years ago

@efindus could you provide a "broken" Desktop Entry to reproduce the issue ?

efindus commented 2 years ago

Ok:

[Desktop Entry]
Name=ApplicationImage
Exec=/home/efindus/Applications/A AppImage Name_4d9eea6234ba4bbbe07792175f9db45f.AppImage
Terminal=false
Type=Application
Icon=appimagekit_fdaa501b56cdbf331e092e8c012891e7_ApplicationImage
StartupWMClass=ApplicationImage
X-AppImage-Version=1.0.0
Comment=ApplicationImage.
Categories=Utility;
TryExec=/home/efindus/Applications/A AppImage Name_4d9eea6234ba4bbbe07792175f9db45f.AppImage
X-AppImage-Old-Icon=ApplicationImage
X-AppImage-Identifier=fdaa501b56cdbf331e092e8c012891e7

This one will fail on Ubuntu 21.04, KDE Plasma 5.21.4 with following error: image It works when I wrap the Exec path in ".

darealshinji commented 1 year ago

Escaping the spaces with a backslash works too.

Exec=/home/efindus/Applications/A\ AppImage\ Name_4d9eea6234ba4bbbe07792175f9db45f.AppImage