-
Install both
xscreensaverandxsecurelockusing your package manager -
Make sure
xscreensaveris not set to lock the screen or to manage the display. Xfce aleady does all those, so there is no need to enable it again. -
Also make sure that the
xscreensaverdaemon is not autostarted. Not doing this may result in the screen not being locked. -
Set the following environmental variables (in
~/.xprofileor~/.xsession) forxsecurelock:# xsecurelock options
export XSECURELOCK_SAVER=saver_xscreensaver