Seems like the answer to your question is contained within an other question on this site.
I am trying to play videos automatically when the Raspberry Pi boots. I decided to use crontab for that:
The autostart.sh file contains the following code:
xbmc-send -a “PlayMedia(/storage/videos/)”
The Raspberry Pi successfully automatically starts to play videos from /storage/videos/ directory when it reboots.
Hope that helps.
This is like asking “How do I fix my car when it won’t start?” Your question is way to broad to answer. The process will remain basically the same form case to case. Here are some steps that you can go through to figure this out.
- Using Terminal, shell, SSH, etc., figure out the command that will start the video as desired.
- READ this document to figure out how to turn that shell command into a bash script.http://www.calpoly.edu/~rasplund/script.html
- READ this document to figure out how to run that bash script on boothttp://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/
- Reboot, test and troubleshoot.