we want to show a video in the entrance hall with the activities of our company.

Now in crontab withcrontab -e i have this line to open the movie file that we want to show.

@reboot vlc ~/Desktop/movie.mp4 -f --loop 

But i don't see the movie after boot. Crontab executes the shutdown command every day at 18:00 pm

  • Does ~ refer to the home folder of root or the home folder of pi? – Dmitry Grigoryev Apr 12 '20 at 22:50

Likely what's happening is vlc is trying to start before Xorg does. For autostarting applications that require X to already be running, add your vlc command line to ~/.config/lxsession/LXDE-pi/autostart.

Alternatively, use a video player that does not require a X session, such as omxplayer.


my company's current solution for a kiosk is a root crontab

@reboot bash /home/pi/pi-kiosk/autostart.sh

inside /home/pi/pi-kiosk/autostart.sh :

#!/usr/bin/env bash
while true
    omxplayer -o hdmi /home/pi/pi-kiosk/kiosk/* 2>> /home/pi/pi-kiosk/error.log 1> /dev/null

the pi-kiosk folder is setup as a samba share that we can just drag and drop video files to. I wrote the script this way to allow the video file to be hotswapped live because using a --loop parameter only works if the file never changes

the only downside i've seen to this is that there is no way to vnc in and visually verify that the video is playing, but you get much better framerates than if you WERE running VNC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.