--- xflock4 2007-12-04 18:01:57.000000000 +0100 +++ xflock4.new 2008-10-05 14:53:19.000000000 +0200 @@ -19,11 +19,17 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -if test x"`which xscreensaver-command 2>/dev/null`" != x""; then +if which xscreensaver-command &>/dev/null; then xscreensaver-command -lock -elif test x"`which gnome-screensaver-command 2>/dev/null`" != x""; then +elif which gnome-screensaver-command &>/dev/null; then gnome-screensaver-command --lock -else +elif which xlock &>/dev/null; then xlock $* +else + echo "Could not find xscreensaver, gnome-screensaver or xlock. I Cannot work without one of them." >&2 + if which zenity &>/dev/null; then + zenity --error --title "Xflock4 error" --text "Could not find xscreensaver, gnome-screensaver or xlock. I Cannot work without one of them." + fi + exit 1 fi exit 0