This is clearly wrong, since the very point of disabling a screensaver in the Settings is to lock the screen manually when needed.
Locking the screen with xscreensaver also fails, since "xfce4-screensaver is already running".
I suggest making sure that xfce4-screensaver is never running if the screensaver is disabled in the settings (perhaps by periodically polling the process space).
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Hmm no I actually think this is one of those cases where xflock4 doesn't do the right thing. However I don't see why disabling the screensaver in xfce4-screensaver-preferences has any influence. If you enable it, does xflock4 manage to lock the screen?
I suggest making sure that xfce4-screensaver is never running if the screensaver is disabled in the settings
We can't do this, because the screensaver must be running for xfce4-screensaver-command --lock to work.
I can't reproduce this problem though. With xfce4-screensaver 4.16.0, xfce4-screensaver-command --lock works for me regardless of whether the screensaver is enabled or disabled in xfce4-screensaver-preferences.
Because I am generally using xscreensaver. To be honest, I don't really understand the reason for xfce4-screensaver to exist, but that's just me.
We can't do this, because the screensaver must be running for xfce4-screensaver-command --lock to work.
But what's the connection? If xscreensaver is running, just use xscreensaver to lock, because presumably that is what the user wants. If nothing is running, run xfce4-screensaver (if you need it that much), lock the screen, and kill it after unlock. Surely, it is not a problem to add a switch like, xfce4-screensaver-command --lock --die-after-unlock
You know, we're now at Xfce 4.18, and there have been quite a few changes here. By the way, disabling the screensaver doesn't mean killing the process. Finally, if you don't use xfce4-screensaver, I suggest you uninstall it.
Anyway, I can't reproduce your problem: xflock4 does invoke xscreensaver-command -lock first, and this command does lock the screen for me.
xscreensaver should complain about xfce4-screensaver already running on screen :0.0
Which version of xscreensaver are you using?
I will test with the last xfce, and report.
Please make sure you update to the latest versions of xfce4-session (4.18.3) and xfce4-screensaver (4.18.2), which in particular means libxfce4ui 4.18.4.
I have just checked, and uninstalling xfce4-screensaver is not an option, because it is breaking hibernation. The system refuses to hibernate, because it cannot lock the screen. (I have no idea why it is not using xscreensaver to lock it).
With which versions of the above components? With the latest versions it should work, at least if you set xscreensaver-command --lock as the lock command, i.e.