Question regarding xscreensaver

Hi all, :wave:

I wonder if anyone could help me shed some light on a certain matter.

I need a simple way of temporarily disabling the screensaver in Lubuntu 20.04.3 LTS.

Background:

I often let my system read out text from the browser/pdf etc. to me. I once wrote a dedicated script for that purpose.

Whenever the reading itself takes longer than 10 minutes or so (and if I don´t use my mouse in the meantime) the screensaver kicks in.
Of course this isn´t a huge problem by itself as I just have to move my mouse a bit to get my display back but it got me wondering:

Wouldn´t there be an uncomplicated solution (a simple command via CLI would do) for temporarily disabling the screensaver :question:

I´ve looked around a bit and found caffeine (Caffeine in Launchpad )as a possible solution. Yet I´d have to install the programme and see how it works. But perhaps this might be an overkill?
I´d rather prefer the CLI. :blush:

I was wondering about

xset s off and later (when I need the screensaver again) xset s on

man xset says:

xset - user preference utility for X […]The s option lets you set the screen saver parameters

But xset q produced a curious output:

[...]
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  0
  [...]

That´s a bit funny because after about 10 minutes the screensaver kicks in despite the setting of “timeout: 0”. :thinking:
That seems to be the default setting as I never changed anything.

I compared that with Debian10 which I have installed as a VM. Here the default settings seem to be correct: “timeout: 600”.

Any ideas why xscreensaver still kicks in after about 10 minutes?

Thanks a lot in advance.

Many greetings.
Rosika :slightly_smiling_face:

Lubuntu uses xscreensaver, where settings can be found in ~/.xscreensaver.

From man xscreensaver you’ll read

   Options to xscreensaver are stored in one of two places: in a .xscreensaver file in your home directory; or in the X  re‐
   source database.  If the .xscreensaver file exists, it overrides any settings in the resource database.

Rather than editing the file directly, xscreensaver --help says

guiverc@d960-ubu2:/de2900/xubuntu_64$   xscreensaver --help
xscreensaver 5.45, copyright (c) 1991-2020 by Jamie Zawinski <jwz@jwz.org>

  All xscreensaver configuration is via the `~/.xscreensaver' file.
  Rather than editing that file by hand, just run `xscreensaver-demo':
  that program lets you configure the screen saver graphically,
  including timeouts, locking, and display modes.

The suggested xscreensaver-demo command lets you change the settings pretty easily (ie. change Mode to Disable maybe).

3 Likes

Hi Chris, :wave:

thank you so much for your very quick reply and help. :heart:

It never occurred to me to look up man xscreensaver. I was thinking only about xset.
Sorry for that. :blush:

That´s the explanation of course. :+1:

I see. Indeed I can change the repective settings to “Disable Screen Saver” in “Mode”. You´re perfectly right there.

I was hoping for a command I could apply via the CLI as I want to disable xscreensaver just temporarily (for the duration of my script) but if that´s not possible I´d have to use the GUI instead.

Thanks again for your kind help.

Many greetings from Rosika :slightly_smiling_face:

3 Likes

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.