Is There Some Way in Ubuntu Mate to Instantly Start the Screensaver?

In Ubuntu Mate, is there some way to instantly start the screensaver? That is, you just click a button, or type a shell command, and it starts, with no waiting time? For the record, I'm using 21.10.

One way to do this is to use the command.

mate-screensaver-command --activate

You can assign this to a keyboard shortcut if you want a key to initiate it.

1 Like

Thank you! Hm, sometimes it works, and sometimes I get an error message saying "Screensaver is not running!"

Yep, mate-screensaver can crash sometimes (on my system typically after two days when I leave the system running for a prolonged time....screensaver never stays up longer than two days).
To instantly start the screensaver-service you can enter the following in a terminal:

nohup mate-screensaver &

You can combine this with the command given by @goinglinux :

pgrep mate-screensave || ( nohup mate-screensaver & )
mate-screensaver-command --activate

Which does so much as:

  1. start the screensaver-service if it is not running already
  2. activate the screensaver

Thank you, works like a charm!