WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: simple-screensaver: a minimalistic alternative to xscreensaver  (Read 1857 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
My family's "digital media player" is an old laptop running TCL and connected to a plasma TV and infrared receiver. A screensaver is required because a static image for a long time will damage the plasma display.

I love the animations included with xscreensaver (particularly xanalogtv) but xscreensaver itself is too full-featured for my needs. In particular, I don't like:

1. basic functionality is split between xscreensaver and xscreensaver-command, both of which are somewhat complex
2. as used with xscreensaver, xanalogtv requires perl in order to load and use your personal images
3. in addition to running xscreensaver, I need to to concurrently run a custom shell script that ensures screensaver is off when there is sound (sound = surrogate for video playback, whether from a dedicated media playback utility or from web browser)

I looked around for relief from these aggravations but found none, so I decided to fix it myself.

It turns out that a single shell script is perfectly capable of doing everything I need. Also, with some refactoring, perl is not needed.

I packaged up my solution as simple-screensaver.tcz and submitted it for TCL12 x86_64. I hope someone else can put it to good use :)

https://github.com/bdantas/simple-screensaver

P.S. The helper extension xprintidle.tcz and the animations themselves are binaries (i.e., architecture-specific). If anyone needs/wants simple-screensaver for x86, let me know and I'll put it together.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: simple-screensaver: a minimalistic alternative to xscreensaver
« Reply #1 on: May 26, 2021, 09:08:30 AM »
I submitted an extension for TCL12 x86.

The only assumptions that the script makes is that you are running Xorg and some kind of NetWM-compatible window manager. Details and usage instructions are in the .info file as well as on github.

P.S. One last relevant detail that has nothing to do with simple-screensaver specifically: Xorg comes with energy-saving features (DPMS) that blanks your monitor after prolonged inactivity. If you want Xorg to stay out of the way and just leave your monitor on indefinitely, put these commands in a little script (I call mine "noblanking.sh") and run it at each boot:

Code: [Select]
#!/bin/sh
xset s off  # disable Xorg's built-in "screensaver"
xset -dpms # disable DPMS (Energy Star) features
xset s noblank # don't blank the video device

I considered including these commands in the simple-screensaver script but didn't want the script to make too many assumptions.

Happy hacking!

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: simple-screensaver: a minimalistic alternative to xscreensaver
« Reply #2 on: May 26, 2021, 09:52:14 AM »
Gosh, I forgot to mention something else: The extension's .dep file lists the minimum number of dependencies required to run the script, the xanalogtv animation, and most of the other animations.

Some animations require  glu.tcz  and some others (e.g., those called gl-whatever) require  Xorg-7.7-3d.tcz , for example. Before adding an animation to the command file, run the animation manually (i.e., do this in a terminal: /usr/local/share/simple-screensaver/animations/<animation_name>) to make sure it works. If it's missing a library, it will tell you which one and you can run provides.sh <missing_library> to figure out which additional extension you need.

Phew! Hopefully I covered everything now. Send me a PM if you discover any other wrinkle or need help.

P.S. Even though my script takes out a lot of complexity, it seems some residual complexity is inevitable. Oh, well, it's not a perfect world ;D
« Last Edit: May 26, 2021, 10:00:55 AM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: simple-screensaver: a minimalistic alternative to xscreensaver
« Reply #3 on: June 02, 2021, 11:12:34 AM »
I refactored this some more. Now it's trivial to use, plus all animations should work without having to hunt down missing dependencies.

Juanito, I submitted it for TCL12 x86_64 and x86. Kindly post when you have some time.