On OpenBSD (and maybe other systems) xscreensaver-command/gnome-screensaver-command are in usr/local/bin and xset/xlock are in usr/X11R6/bin. As of now xflock4 fails to find them and is thus useless. While here add support for xidle, which is in OpenBSD's base system and also packaged (at least) in FreeBSD and Gentoo.
Created attachment 4394 add X11R6/local to PATH and add support for xidle
This approach is broken, pkill is not only non-portable but should also never be used from a script like this because the argument is interpreted as a regular expression which may match any process whose command contains the given substring "xidle". Apart from that using xidle is superfluous, it cannot lock the screen itself anyway and relies on something like xlock and it might even execute some other command given by the user which does not lock the screen at all.
Created attachment 4407 add /usr/{local,X11R6}/bin to PATH Okay, makes sense. Let's just fix the PATH then.
Are those additional PATH items not needed anymore? They seem to have been removed from Git.
Would fixing Bug 12282 do?
I this issue is fixed with 4.13.x. Now xflock call xfconf for the default screensaver to run, so you can set whatever binary you want: https://git.xfce.org/xfce/xfce4-session/tree/scripts/xflock4#n27
saome comment as https://bugzilla.xfce.org/show_bug.cgi?id=12282#c9 :) here xfce4-screensaver is in usr/local/bin, so if xfconf has no value, xflock will fail to find it..
*** This bug has been marked as a duplicate of bug 12282 ***