Header RSS Feed
 
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup BSD Database Hacks Hardware Internet Linux Mail MySQL Monitoring Network Personal PHP Proxy Shell Solaris Unix Virtualization VMware Windows Wyse

Play a multimedia file in VLC as cron job
Monday - Oct 24th 2016 - by - (0 comments)

At work we have a Raspberry Pi 2+ connected to a monitoring screen (a Panasonic TV) to display the current status of Icinga2 monitoring and some additional visual monitoring (Nagvis) drawings.

I wanted to troll my colleagues by playing a regular video/sound from a scene of the movie Dante's peak (It's coffee time!). I was able to play the video without problems from the command line using "cvlc", however when the command was launched as a cron job, nothing happened.

This was due to the fact, that inside cron's environment, there is no display ($DISPLAY) configured. In order to do that, the cron command needs to use the local DISPLAY port:

00 09 * * 1-5 DISPLAY=127.0.0.1:0 /usr/bin/cvlc /home/pi/Downloads/COFFEE-TIME.webm; killall vlc

Working :-)

 

Add a comment

Show form to leave a comment

Comments (newest first):

No comments yet.

Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

6939 Days
until Death of Computers
Why?