From: vimacs Date: Thu, 18 Feb 2010 17:44:12 +0000 (+0100) Subject: There may have been a bug preventing the pidlist to display which could be fixed... X-Git-Tag: Release-2010-05/1~103 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45028c728dc3cf3e4cb5dc83081ae1d2b7018a4f;p=pandora-libraries.git There may have been a bug preventing the pidlist to display which could be fixed now :-) modified: testdata/scripts/op_menu.sh --- 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