Slideshow from terminal - Raspberry Pi

From ETCwiki
Jump to navigationJump to search

This program will run from runlevel 2 (command line only) if you want. It uses the Frame Buffer to display images in a slideshow. It preloads and caches images that are upcoming.

apt-get install fbi

Now create 2 scripts to turn on and off the slideshow

cd /home/pi
mkdir scripts
cd scripts
touch sson.sh
chmod +x sson.sh
touch ssoff.sh
chmod +x ssoff.sh
vi sson.sh

Now fill the file sson.sh with this

#!/bin/bash
PHOTODIR=/storage/wallpapers
INTERVAL=30
fbi -T 1 -cachemem 24 -readahead -autodown -t $INTERVAL -u `find $PHOTODIR -iname "*.jpg"`

And fill ssoff.sh with this

#!/bin/bash
killall fbi

Now trigger the slideshow on and off using the scripts

./sson.sh
./ssoff.sh