From 45028c728dc3cf3e4cb5dc83081ae1d2b7018a4f Mon Sep 17 00:00:00 2001 From: vimacs Date: Thu, 18 Feb 2010 18:44:12 +0100 Subject: [PATCH] There may have been a bug preventing the pidlist to display which could be fixed now :-) modified: testdata/scripts/op_menu.sh --- testdata/scripts/op_menu.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testdata/scripts/op_menu.sh b/testdata/scripts/op_menu.sh index 8358845..267472d 100755 --- a/testdata/scripts/op_menu.sh +++ b/testdata/scripts/op_menu.sh @@ -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 -- 2.39.5