#!/bin/bash
pidfile=/var/run/xfce-do/pid
if [ -e $pidfile ]; then
pid=`cat $pidfile`
if kill -0 &>1 > /dev/null $pid; then
exit 1
else
rm $pidfile
fi
fi
echo $$ > $pidfile
xfce4-appfinder
rm $pidfile
Make sure to create the directory and provide write permissions to users.
sudo mkdir /var/run/xfce-do chmod a+w /var/run/xfce-do
