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.