From ac97a3ca87a58081d3dbbb73ae1c852dfe46c085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 14 Sep 2017 01:50:41 +0200 Subject: [PATCH] Look for applications also in subdirectories of .../applications This is especially needed for KDE applications, which live in /usr/share/applications/kde4. Fixes QubesOS/qubes-issues#3092 --- qubes-rpc/qubes.StartApp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qubes-rpc/qubes.StartApp b/qubes-rpc/qubes.StartApp index ca3c48b..6062672 100755 --- a/qubes-rpc/qubes.StartApp +++ b/qubes-rpc/qubes.StartApp @@ -16,9 +16,11 @@ for dir in $(echo "$XDG_DATA_HOME:$XDG_DATA_DIRS" | tr : ' '); do if ! [ -d "$dir/applications" ]; then continue fi - if [ -f "$dir/applications/$app_basename" ]; then - exec qubes-desktop-run "$dir/applications/$app_basename" - fi + for subdir in $(find $dir/applications -type d | sort); do + if [ -f "$subdir/$app_basename" ]; then + exec qubes-desktop-run "$subdir/$app_basename" + fi + done done echo "applications/$app_basename not found in $XDG_DATA_HOME:$XDG_DATA_DIRS" >&2 exit 1