You are not logged in.
Pages: 1
Why does `xscreensaver` support this, but `xfce4-screensaver` doesn't?
https://gitlab.xfce.org/apps/xfce4-scre … issues/141
"XScreensaver can run any command as screensaver and will put its locker over it (if password-locking is enabled)."
https://indigo.re/posts/2020-01-05-xscr … r-mpv.html
"Play any video as a screensaver with mpv and xscreensaver trick/hack"
https://www.linuxquestions.org/question … 175615234/
"I want to make my video to be a screensaver."
https://askubuntu.com/questions/21608/u … creensaver
Offline
"XScreensaver can run any command as screensaver and will put its locker over it (if password-locking is enabled)."
https://indigo.re/posts/2020-01-05-xscr … r-mpv.html
This is not true. As you can see in the link you quote, the contents of the XSCREENSAVER_WINDOW environment variable is passed to mpv, which must know what to do with it. So it's not xscreensaver that can execute any command as a screensaver, but the command in question that must be able to redirect its graphics output to the X11 window whose identifier xscreensaver passes to it (i.e. $XSCREENSAVER_WINDOW).
Now xfce4-screensaver also supports this mode of operation, which is why themes compatible with xscreensaver are also compatible with xfce4-screensaver.
Here's how it's done:
* Put this in /usr/libexec/xfce4-screensaver/mpv.sh
#!/bin/sh
exec mpv --no-audio --fs --loop=inf --no-stop-screensaver --wid=$XSCREENSAVER_WINDOW /foo/bar/some_video.mkv
* Put this in ~/.local/share/applications/screensavers/xfce-mpv-screensaver.desktop
[Desktop Entry]
Type=Application
Name=MPV
Exec=/usr/libexec/xfce4-screensaver/mpv.sh
TryExec=/usr/libexec/xfce4-screensaver/mpv.sh
Categories=Screensaver;
Don't forget to make the script executable.
NB: the use of exec in the script is to ensure that mpv is killed when the screensaver is disabled, otherwise only the script is killed and mpv is reparented.
Last edited by Tamaranch (2024-01-03 10:49:52)
Offline
Yes, adding the `--wid=$XSCREENSAVER_WINDOW` parameter worked, thank you so much!
Tamaranch++
Offline
Pages: 1
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 522.57 KiB (Peak: 528.96 KiB) ]