2

The official documentation for xscreensaver gives an example of how to play videos as a screensaver:

Install mpv and add something like the following to the `programs' preference in your .xscreensaver file:

 "My Movie"  mpv --really-quiet --no-audio --fs --loop=inf  \
                 --no-stop-screensaver                      \
                 --wid=$XSCREENSAVER_WINDOW                 \
                 $HOME/movies/*.mp4                       \n\

That's all well and good, but I would love to have one less dependency on my system (namely, mpv). I'd like to do the same thing, but with VLC.

I've tried adding this to my .xscreensaver file:

"My Movie"  vlc -L -R -f --intf dummy --no-video-title-show  \
                        $HOME/movies/*.mp4                 \n\

This command works perfectly on the command line, but when launched via xscreensaver, this happens:

Sorry for the blurrycam, I couldn't take a screenshot without exiting the screensaver!
Sorry for the blurrycam, I couldn't take a screenshot without exiting the screensaver!

What do you mean, unknown option or missing mandatory argument '--intf'?! It's right there!

Does anyone know why I can't get this VLC command to run via xscreensaver, when it works perfectly when launched straight-up on the command line?

2
  • what happens if you execute the vlc command from the terminal? Do you still see this error? If yes try to reinstall VLC Feb 11, 2016 at 23:36
  • No, it works just fine in the terminal. Same exact command. That's what I said in the last sentence in the post.
    – xd1936
    Feb 12, 2016 at 4:05

2 Answers 2

2

I've been using VLC on xscreensaver for almost a year now. The solution posted here didn't seem to work for me without further tweaking. For anyone coming here on a search engine like I did, an alternate solution that works with VLC version 3.0.12 on Ubuntu (Lubuntu) 21.04:

"Pirate Cinema"  cvlc --loop -Z --fullscreen     \
      --ignore-config --video-filter "vhs"        \
      --no-interact --no-disable-screensaver      \
      --drawable-xid $XSCREENSAVER_WINDOW         \
      --no-audio "$HOME/Videos"      \n\

Photo of two monitors with the xscreensaver lock screen visible above two different videos:

photo

1

this work for me :D

"Videos"    cvlc --loop --fullscreen --drawable-xid   \
              $XSCREENSAVER_WINDOW                    \
              --no-video-title-show                   \
              /path/to/videos.mp4                     \n\
2
  • I'm surprised by the CPU usage. mpv uses around 40% of my cpu to drive the screensaver on two displays, whereas cvlc peaks my CPU to 100% and spins up my fans.
    – xd1936
    Mar 1, 2016 at 18:40
  • Correction: My CPU seems to spike to 100% using clvc, but then calms down to around 40% after about 5 seconds. Interesting.
    – xd1936
    Mar 1, 2016 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .