On the latest XFCE 4.14 there is a command:
xfce4-session-logout
Usage:
xfce4-session-logout [OPTION…]
Help Options:
-?, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
Application Options:
-l, --logout Log out without displaying the logout dialog
-h, --halt Halt without displaying the logout dialog
-r, --reboot Reboot without displaying the logout dialog
-s, --suspend Suspend without displaying the logout dialog
-i, --hibernate Hibernate without displaying the logout dialog
-b, --hybrid-sleep Hybrid Sleep without displaying the logout dialog
-u, --switch-user Switch user without displaying the logout dialog
-f, --fast Log out quickly; don't save the session
-V, --version Print version information and exit
--display=DISPLAY X display to use
Is it that what you're looking for?
xfce4-session-logout
? – Michal Przybylowicz May 29 '20 at 18:16