2

I believe that the command xset s activate is meant to activate the screensaver in X. I tried entering it into a terminal, and it seems to work at first, but the screensaver exits almost straight away (as if entering the command had itself resumed it). i am certain that I'm not accidentally pressing something else after entering the command. On the other hand, if I run sleep 1 && xset s activate, then the screensaver persists. How come?

preferred_anon
  • 329
  • 4
  • 12

1 Answers1

3

When you type

xset s activate

and then Return, I suspect xset runs before you release the key, so the key up event deactivates the screensaver.

Running xset after sleep means the key up event occurs before xset runs (unless you hold the key down of course, but then it would start repeating).

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • Fair enough, that makes sense. I guess this would not be an issue if run through a script, but I'm surprised that it doesn't work as expected when run from the terminal! – preferred_anon Nov 06 '20 at 11:14