Linux How to fade/blank/turn off screen or run screensaver while playing video?
#1
I want to turn off the screen while playing video. It is pretty useful feature when you want to listen some news or talk show on youtube. So what I've tried:

- bind command ActivateScreensaver on gamepad. it starts just for a moment, so screen became bright again . Yes, i've checked all screensaver settings, tried dim and fade one.

- bind running command "DISPLAY=:0.0 xset dpms force off" . It works only just for a few seconds, then kodi turns screen on again.

Now I'm using a hack to start black xterm overlappin kodi window, and it works because I'm using CRT. But maybe it is a better solution?

If there is no one, here is mine for CRT TV, linux, orangepi:

1) Create a fake screensaver script in for example /home/pi/.kodi/userdata/hacks/screensaver:

Code:
#!/bin/bash

found=$(ps aux | grep xterm | wc -l)

if [ $found -gt 1 ]; then
    killall xterm
else
    DISPLAY=:0.0 xterm -fg black -bg black -geometry 280x90 -e "read -n1" &
fi
2) Make it executable

Code:
chmod 755 /home/pi/.kodi/userdata/hacks/screensaver

3) Add its launch to your keymap(I use digit nine), for example to /home/pi/.kodi/userdata/keymaps/keyboard.xml

Code:
<keymap>
  <global>
    <keyboard>
      <nine>System.Exec("/home/pi/.kodi/userdata/hacks/screensaver")</nine>
Reply

Logout Mark Read Team Forum Stats Members Help
How to fade/blank/turn off screen or run screensaver while playing video?0