Fixed pnd_button to work as root
authorvimacs <vimacs@pndtest>
Tue, 22 Dec 2009 23:52:07 +0000 (00:52 +0100)
committervimacs <vimacs@pndtest>
Tue, 22 Dec 2009 23:52:07 +0000 (00:52 +0100)
modified:   pnd_button.sh

testdata/scripts/pnd_button.sh

index fd8d978..b8f957e 100755 (executable)
@@ -18,7 +18,8 @@ if [ $xpid ]; then
     done
   else
   echo "starting appfinder"
-    xfce4-appfinder
+    xfceuser=$(ps u -C xfce4-session | tail -n1 | awk '{print $1}')
+    sudo -u $xfceuser xfce4-appfinder
   fi
 else
   echo "no x, killing all pnd aps so x gets restarted"