Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to disable screensaver completely

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
fred44nl
Posts: 215
Joined: 2018-07-14 08:54
Has thanked: 1 time

How to disable screensaver completely

#1 Post by fred44nl »

as the title says, how can I disable the screensaver completely, preferably without software ??
my machine runs Debian 9 with LXDE and uses Xscreensaver 5.36
don't know how, but this screensaver appears not be running, all the time.
I have found some suggestions on internet, but they don't seem to work.
suggestions are appreciated.
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: How to disable screensaver completely

#2 Post by arzgi »

fred44nl wrote:as the title says, how can I disable the screensaver completely, preferably without software ??
my machine runs Debian 9 with LXDE and uses Xscreensaver 5.36
I have no experience of LXDE, using XFCE. But usually those are set somewhere in settings, in XFCE under power manager. Some DEs let you manage those with right click on desktop.

peter_irich
Posts: 1403
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: How to disable screensaver completely

#3 Post by peter_irich »

I don't know LXDE. Perhaps, screensaver is in autostart, try find it among programs those which are running
when you are log in.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: How to disable screensaver completely

#4 Post by debiman »

fred44nl wrote:preferably without software
what?
you are going to have to explain that.

fwiw, there are several pieces of software (sic) that are sometimes called screensaver (by users):
- a graphical screensaver like xscreensaver, gnome-screensaver etc.
- Xorg's own screensaver (blanking only), adjustable via xset
- systemd's logind settings
- power management (i.e. switching off the monitor)
- a screen locker

User avatar
fred44nl
Posts: 215
Joined: 2018-07-14 08:54
Has thanked: 1 time

Re: How to disable screensaver completely

#5 Post by fred44nl »

debiman wrote:
fred44nl wrote:preferably without software
what?
you are going to have to explain that.
what I mean is, not with XScreensaver, but with xset or setterm
but those do not work.
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to disable screensaver completely

#6 Post by Head_on_a_Stick »

Try

Code: Select all

mkdir -p ~/.local/share/applications
cp /usr/share/applications/xscreensaver.desktop ~/.local/share/applications
echo "Hidden=true" >> ~/.local/share/applications/xscreensaver.desktop
See also https://www.freedesktop.org/wiki/Specif ... tart-spec/
deadbang

User avatar
fred44nl
Posts: 215
Joined: 2018-07-14 08:54
Has thanked: 1 time

Re: How to disable screensaver completely

#7 Post by fred44nl »

ok, thank you.
I don't have /usr/share/applications/xscreensaver.desktop
instead there is xscreensaver-properties.desktop/xscreensaver-properties.desktop
would that work ??
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to disable screensaver completely

#8 Post by Head_on_a_Stick »

Sorry OP, I was getting confused, please disregard my previous post, I don't even use LXDE.
deadbang

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How to disable screensaver completely

#9 Post by bw123 »

...
I have found some suggestions on internet, but they don't seem to work. suggestions are appreciated.
When you try solutions and they don't work, it is helpful to list them briefly with code examples, or link to them so people don't waste time suggesting them again. Cpoying and patsing in code tags is also a good way to spot typos in commands, and other basic mistakes.

https://duckduckgo.com/html/?q=disable+lxde+screensaver
resigned by AI ChatGPT

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How to disable screensaver completely

#10 Post by GarryRicketson »

People should show what the actually tried, I mean show the code they used,
it might just be a minor typo , and that is why it did not work.

For example: I tried this :

Code: Select all

nano /etc/xdg/lxsession/LXDE/autostart
I was going to delete the screensaver line, but it did not work, I could not save the file.
Reply " Did you run nano as sudo or root ? "
No,
"Then try it using sudo "

Code: Select all

sudo nano /etc/xdg/lxsession/LXDE/autostart
"Oh, great, now that worked, and it saved the file."

==============just a example, it might not apply here ===
I have found some suggestions on internet, but they don't seem to work. suggestions are appreciated.
This is use less to us, the OP expects us to search the internet for them, and then try "some suggestions", and then tell them why those did not work, and we don't even know if they really tried those suggestions correctly.
Please show what you actually did try.

User avatar
fred44nl
Posts: 215
Joined: 2018-07-14 08:54
Has thanked: 1 time

Re: How to disable screensaver completely

#11 Post by fred44nl »

yes, ok.
I purged XScreensaver and installed it again.
but is does not seem to load always.

sudo xset s off - result: xset: unable to open display ""

sudo setterm -powersave off - result: setterm: cannot (un)set powersave mode: wrong ioctl() for device.
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: How to disable screensaver completely

#12 Post by Wheelerof4te »

Either remove it, or use a DE you understand. LXDE is very, very outdated in Debian and is no longer maintained upstream. Both XFCE and MATE are resource friendly DEs.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How to disable screensaver completely

#13 Post by bw123 »

xset is a command that sets user preferences for X, so by using sudo you are trying to open a display as root. It's not going to work that way, X displays are assigned to the user thru a kind of complicated auth process.

When trying to figure out whether or not a command needs to be run with sudo or as root, I often use 'which' command as a regular user:

Code: Select all

$ which xset
/usr/bin/xset
Since which command found xset in my path, I don't need to be root, or use sudo. This is almost always true.

I use a little script to control blanking on window manager systems:

Code: Select all

$ cat bin/blank
#!/bin/sh
# blank on/off script

NAME=blank

do_on()
{
        xset +dpms s on
        echo Screen Blanking is ON
        xset q | grep 'timeout\|DPMS is'
}

do_off()
{
        xset -dpms s off
        echo Screen Blanking is OFF
        xset q | grep 'timeout\|DPMS is'
}

case "$1" in
        on)     do_on   ;;
        off)    do_off  ;;
        *)
                echo "Usage: $NAME {on|off}" >&2
                xset q | grep 'timeout\|DPMS is'
esac
xscreensaver resets the 's' setting as part of it's configuration, so to turn it on and off I use this on systems where it is installed. It works well with kde plasma on stretch, I've used it this way for over a year. Adding these commands to the right do_on and do_off sections in the script.

Code: Select all

$ /usr/share/xscreensaver/xscreensaver-wrapper.sh -nosplash
$ xscreensaver-command -exit
These commands and scripts are run as a regular user, while an Xsession is up, not as root. xscreensaver also can be configured to be system-wide, which might need root to control? and that setup is described in it's documentation, somewhere around /usr/share/doc/xscreensaver I haven't used it this way.

It's possible that lxde uses it's own locker program (lxlock?) to run the screensaver, you probably didn't need to install the xscreensaver pkg.
resigned by AI ChatGPT

User avatar
fred44nl
Posts: 215
Joined: 2018-07-14 08:54
Has thanked: 1 time

Re: How to disable screensaver completely

#14 Post by fred44nl »

did some tests, all as regular user while an X-session was up.

Code: Select all

$ which xset
/usr/bin/xset

Code: Select all

$ which lxlock
/usr/bin/lxlock

Code: Select all

$ xset +dpms s on
this gives a long list of options.

Code: Select all

xset s off
works

Code: Select all

$ xset  q | grep 'timeout\|DPMS is'
this gives:
timeout:0 cycle: 600
Display is not capable of DMPS
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1

Post Reply