How to disable screensaver completely

New to Debian (Or Linux in general)? Ask your questions here!

How to disable screensaver completely

Postby fred44nl » 2018-09-15 08:46

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 9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 62
Joined: 2018-07-14 08:54

Re: How to disable screensaver completely

Postby arzgi » 2018-09-15 09:02

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.
arzgi
 
Posts: 387
Joined: 2008-02-21 17:03
Location: Finland

Re: How to disable screensaver completely

Postby peter_irich » 2018-09-15 09:05

I don't know LXDE. Perhaps, screensaver is in autostart, try find it among programs those which are running
when you are log in.
peter_irich
 
Posts: 1233
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: How to disable screensaver completely

Postby debiman » 2018-09-15 10:25

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
debiman
 
Posts: 2900
Joined: 2013-03-12 07:18

Re: How to disable screensaver completely

Postby fred44nl » 2018-09-15 11:57

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 9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 62
Joined: 2018-07-14 08:54

Re: How to disable screensaver completely

Postby Head_on_a_Stick » 2018-09-15 12:26

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/
User avatar
Head_on_a_Stick
 
Posts: 8008
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to disable screensaver completely

Postby fred44nl » 2018-09-15 12:37

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 9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 62
Joined: 2018-07-14 08:54

Re: How to disable screensaver completely

Postby Head_on_a_Stick » 2018-09-15 12:40

Sorry OP, I was getting confused, please disregard my previous post, I don't even use LXDE.
User avatar
Head_on_a_Stick
 
Posts: 8008
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to disable screensaver completely

Postby bw123 » 2018-09-15 12:54

...
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
User avatar
bw123
 
Posts: 3403
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How to disable screensaver completely

Postby GarryRicketson » 2018-09-15 14:15

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
GarryRicketson
 
Posts: 5129
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How to disable screensaver completely

Postby fred44nl » 2018-09-15 14:30

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 9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 62
Joined: 2018-07-14 08:54

Re: How to disable screensaver completely

Postby Wheelerof4te » 2018-09-15 14:42

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
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: How to disable screensaver completely

Postby bw123 » 2018-09-15 14:55

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.
User avatar
bw123
 
Posts: 3403
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How to disable screensaver completely

Postby fred44nl » 2018-09-15 15:49

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 9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 62
Joined: 2018-07-14 08:54


Return to Beginners Questions

Who is online

Users browsing this forum: cooler01 and 5 guests

fashionable