diff --git a/shell/services/AppLibrary.qml b/shell/services/AppLibrary.qml index ef9456f4..d26f3c82 100644 --- a/shell/services/AppLibrary.qml +++ b/shell/services/AppLibrary.qml @@ -78,7 +78,10 @@ Item { var id = String(desktopId || "") if (!id) return root.beginLaunchFeedback(name) - Util.execDetached("gtk-launch " + Util.shellQuote(id)) + // Pass the file name with its extension: gtk-launch only appends ".desktop" + // when the argument doesn't already end with it, so ids that themselves end + // in ".desktop" (e.g. org.telegram.desktop) would otherwise never resolve. + Util.execDetached("gtk-launch " + Util.shellQuote(id + ".desktop")) } function remove(desktopId, name) { diff --git a/test/shell.d/app-search-test.sh b/test/shell.d/app-search-test.sh index 99e7678c..c8352afc 100644 --- a/test/shell.d/app-search-test.sh +++ b/test/shell.d/app-search-test.sh @@ -104,6 +104,11 @@ assert( 'app library runs desktop entry launch through the shell' ) +assert( + appLibraryQml.includes('Util.shellQuote(id + ".desktop")'), + 'app library launches by full file name so ids ending in .desktop (org.telegram.desktop) resolve' +) + assert( /function iconIndexScanCommand\(\)[\s\S]*-path "\*\/apps\/\*" -o -path "\*\/devices\/\*"/.test(appLibraryQml), 'app library fallback icon index includes device icons'