There may have been a bug preventing the pidlist to display which could be fixed...
authorvimacs <vimacs@pndtest>
Thu, 18 Feb 2010 17:44:12 +0000 (18:44 +0100)
committervimacs <vimacs@pndtest>
Thu, 18 Feb 2010 17:44:12 +0000 (18:44 +0100)
modified:   testdata/scripts/op_menu.sh

testdata/scripts/op_menu.sh

index 8358845..267472d 100755 (executable)
@@ -9,16 +9,16 @@ fi
 xpid=$(pidof X)
 if [ $xpid ]; then
   echo "x is running"
+  xfceuser=$(ps u -C xfce4-session | tail -n1 | awk '{print $1}')
   if [ $killist ]; then
     echo "displaying kill list"
-    pidlist=$(pstree -lpA | grep pnd_run.sh | sed -ne 's/.*-\(.*\)(\([0-9]\+\))/\2\n \1/p' | DISPLAY=:0.0 zenity --list --multiple --column "pid" --column "name" --title "kill" --text "which apps should be killed" | sed 's/|/\n/')
+    pidlist=$(pstree -lpA | grep pnd_run.sh | sed -ne 's/.*-\(.*\)(\([0-9]\+\))/\2\n \1/p' | su -c 'DISPLAY=:0.0 zenity --list --multiple --column "pid" --column "name" --title "kill" --text "which apps should be killed"' - $xfceuser | sed 's/|/\n/')
     for PID in $pidlist
     do
       kill -9 $PID
     done
   else
-  echo "starting appfinder"
-    xfceuser=$(ps u -C xfce4-session | tail -n1 | awk '{print $1}')
+    echo "starting appfinder"
     su -c 'DISPLAY=:0.0 xfce4-appfinder' - $xfceuser
   fi
 else