12,285
edits
mNo edit summary |
|||
Line 3: | Line 3: | ||
== Making the RapberryPi run a video at startup == | == Making the RapberryPi run a video at startup == | ||
Install The Raspbian image (NOOBS is okay for the beginning, but it wastes a bit space on the SDcard for the recovery image which we don't need. here is how to copy the raspbian on the card: [http://elinux.org/RPi_Easy_SD_Card_Setup source] | Install The Raspbian image (NOOBS is okay for the beginning, but it wastes a bit space on the SDcard for the recovery image which we don't need. here is how to copy the raspbian on the card: [http://elinux.org/RPi_Easy_SD_Card_Setup source] | ||
Line 20: | Line 19: | ||
omxplayer -r /opt/vc/src/hello_pi/hello_video/test.h264 | omxplayer -r /opt/vc/src/hello_pi/hello_video/test.h264 | ||
startup_script.sh | make a file startup_script.sh (shell script) with the following content: | ||
clear | clear | ||
Line 28: | Line 27: | ||
omxplayer -r movie.mp4 --loop | omxplayer -r movie.mp4 --loop | ||
you will have to make this executable with | |||
sudo chmod 775 startup_script.sh | |||
and you can test if it works by running it | |||
./startup_script.sh | |||
Make it log in automatically | === Make it log in automatically === | ||
http://opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html | [http://opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html source] | ||
Step 1: Open a terminal session and edit inittab file. | Step 1: Open a terminal session and edit inittab file. | ||
sudo nano /etc/inittab | sudo nano /etc/inittab | ||
Step 2: Disable the getty program. | Step 2: Disable the getty program. | ||
Navigate to the following line in inittab | Navigate to the following line in inittab | ||
Line 40: | Line 46: | ||
And add a # at the beginning of the line to comment it out | And add a # at the beginning of the line to comment it out | ||
#1:2345:respawn:/sbin/getty 115200 tty1 | #1:2345:respawn:/sbin/getty 115200 tty1 | ||
Step 3: Add login program to inittab. | Step 3: Add login program to inittab. | ||
Add the following line just below the commented line | Add the following line just below the commented line | ||
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1 | 1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1 | ||
This will run the login program with pi user and without any authentication | This will run the login program with pi user and without any authentication | ||
Step 4: Save and Exit. | Step 4: Save and Exit. | ||
Line 52: | Line 60: | ||
./startup_script.sh | ./startup_script.sh | ||
fi | fi | ||
(that last 'if' makes sure the script is not starting in an x session) | |||
==Synchronizing multiple RaspberryPi== | ==Synchronizing multiple RaspberryPi== | ||
Line 95: | Line 105: | ||
==Notes== | ==Notes== | ||
other | ===other resources=== | ||
Use multiple RasberryPis to make a video wall (needs one extra server-Pi, plus one Pi per client) [http://www.piwall.co.uk Piwall] | Use multiple RasberryPis to make a video wall (needs one extra server-Pi, plus one Pi per client) [http://www.piwall.co.uk Piwall] | ||
===Backup and copy=== | |||
let's say /dev/mmcblk0 is your card reader | |||
make a backup of SDCard: | make a backup of SDCard: |