I've been trying to figure out how to lock the screen in XUbuntu 16.04 and I can't seem to make anything work. Various posts suggest using the settings under 'Power Manager' and 'Light Locker Settings', which have selectors to enable and disable the screensaver, and I've tried all possible combinations of them, but none of them do anything.
Other places suggest running xflock4 or hitting ctrl-alt-del (which on the keyboard shortcuts runs xflock4), but that also does nothing. There's also no documentation for xflock4 (man xflock4 says "No manual entry" and xflock4 --help does nothing.)
Update
After poking around things for awhile, I fould dm-tool which has a lock option. Running dm-tool lock from a terminal successfully locks the screen. I can also set the keyboard shortcuts to make ctrl-alt-del run dm-tool lock, so I can now lock the screen with a key combo.
However, I still can't figure out how to get it to lock the screen after a timeout...
xflock4is just a shell script that will first try the command set in LockCommand (in newer versions), then xscreensaver, then light-locker, then gnome-screensaver: https://git.xfce.org/xfce/xfce4-session/tree/scripts/xflock4 – bmaupin Apr 14 '20 at 19:08