Skip to content

[Enhancement] The one screensaver/lock screen entry point (xflock4)

What does xflock4 do?

  1. Tries to run the command set in the session's xfconf channel.
  2. Tries to run xscreensaver-command, light-locker-command, xfce4-screensaver-command.

Where is it called?

  1. In xfce4-session: Run xflock4 before suspending or hibernating the system (BTW, it is not true: xfce4_screensaver_lock tries other options before running xflock4.)
  2. The same for xfce4-power-manager (but without a tooltip).
  3. In xfce4-panel.
  4. As a keyboard shortcut.
  5. In several plugins.

So, in pp. 3-5 it is called directly.

But in in pp. 1, 2, D-Bus-based screensavers are tried first. And then, xflock4 is called (which tries to call xfce4-screensaver-command and is a fork bomb, among other things). As I understand, xfce4-screensaver provides a D-Bus-based screensaver entry point. So, xflock tries to call it one more time.

So: sometimes, xflock4 is a screensaver/lock screen entry point. Sometimes, it's not. Sometimes, it will be recursive.

I have an idea: to have one screensave/lock screen entry point. Maybe in Bash, maybe in C. Which tries (or doesn't try - according to command line/XfConf options) to send relevant DBus messages, run relevant binaries.

Everything will call it. By one line. To one behavior only.


See also / possibly related / possibly will (partially) solve / is solving by:

Edited by Alexander Kurakin