From 4cd30a26184f2bdb88a73d036d26a918a9b48600 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 13 May 2016 21:42:04 -0500 Subject: [PATCH] Fixed su launch issues and 2&>1 issue --- shellMen | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shellMen b/shellMen index 9cb3a70..92946e6 100755 --- a/shellMen +++ b/shellMen @@ -115,10 +115,11 @@ i="1" while [ $i -le $x ]; do line1=$(sed -n "${i}p" "${pth}"/menu.list); filename="${line1%.*}" - execMethod=$(grep -A 0 "Exec=" /usr/share/applications/"$line1") + execMethod=$(grep -A 0 -m2 "Exec=" /usr/share/applications/"$line1" | tail -n1) + execMethod=$(echo ${execMethod} | sed s/Exec=//g | sed s/%f//g) catagory=$(grep -A 0 "Categories=" /usr/share/applications/"$line1") preComment=$(grep -A 0 "Comment=" /usr/share/applications/"$line1") - execCMD=$(echo "${filename}) ${filename} & shellMen ;;") + execCMD=$(echo "${filename}) ${execMethod} & shellMen ;;") if [[ "$catagory" == *"$accss"* ]] || [[ "$catagory" == *"$util"* ]]; then echo "$execCMD" >> "${pth}"/${accss}.sh elif [[ "$catagory" == *"$dev"* ]]; then