Moode Forum
[PROBLEM] Screensaver to prevent unwanted input - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: [PROBLEM] Screensaver to prevent unwanted input (/showthread.php?tid=6290)



Screensaver to prevent unwanted input - Ale2.0 - 03-07-2024

Hello there

Moode is running great but I often run into a problem with the local screen connected via HDMI.

If it blanks, what is wanted, it registers an input instead of just waking the screen if i touch it.

Causing issues like skipping songs, changing the value or play random music.


Is it just an issue for me? Are there plans to include something like xscreensaver?

Thank you and have a nice day!
Greetings


RE: Screensaver to prevent unwanted input - Tim Curtis - 03-07-2024

What is xscreensaver?


RE: Screensaver to prevent unwanted input - Ale2.0 - 03-07-2024

(03-07-2024, 04:40 PM)Tim Curtis Wrote: What is xscreensaver?

Seems to be a program for xServer screens to handle screensavers for example also while blanking.

I suspect it will cover the "screen" with black and disappear if it is touched.

Therefore the first touch would not register in chrome which is laying behind.


Of course it could be integrated whole and also provide funny screensavers which do not save the screen but look pretty.

(https://wiki.archlinux.org/title/XScreenSaver)
https://www.jwz.org/xscreensaver/man1.html

As far as I have seen the  local screen is running chrome via the xinit file.
This suggests it's running an Xserver display for which this application seems to be made.


RE: Screensaver to prevent unwanted input - Tim Curtis - 03-07-2024

It sounds like you haven't actually test this to confirm that the first touch after a screen blank is ignored.

In any case below is the code that sets up and launches Local Display. Maybe there is some sort of X command or option to "ignore first touch/click after screen blank". If not then there is prolly no way to do it.

Code:
#!/bin/bash
#
# moOde audio player (C) 2014 Tim Curtis
# http://moodeaudio.org
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

# Turn off display power management
xset -dpms

# Screensaver timeout in secs or 'off' for no timeout
xset s 600

# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"

# Clear browser cache
$(/var/www/util/sysutil.sh clearbrcache)

# Launch chromium browser
chromium-browser --app="http://localhost/" \
--window-size="$SCREENSIZE" \
--window-position="0,0" \
--enable-features="OverlayScrollbar" \
--no-first-run \
--disable-infobars \
--disable-session-crashed-bubble \
--kiosk



RE: Screensaver to prevent unwanted input - Ale2.0 - 03-09-2024

(03-07-2024, 07:28 PM)Tim Curtis Wrote: It sounds like you haven't actually test this to confirm that the first touch after a screen blank is ignored.

What do you mean?

I have set up a system with a local Display and I have the issue.
I now have installed Xscreensaver and so far it seems to work.

I am still tuning the settings but the blanking works as intended and blocks the first input.


RE: Screensaver to prevent unwanted input - Ale2.0 - 03-09-2024

Here are the steps I have taken:

sudo apt install xscreensaver
export DISPLAY=:0
DISPLAY=:0 xscreensaver-demo

This opens the configuration utility on the local hdmi screen where you can configure the screensaver.


If you want to shut down the display you need to enable power management under advanced.

Apparently there would be a config file but I did not play with that.


I added the following lines to the xinit in order to start the deamon:
# Start screensaver

xscreensaver -no-splash &

In order to do this in a clean way you should also specify -display but i did not yet research the syntax in order to do so.



Greetings Ale