Chapter 17:

SLIDE SHOW PRESENTATION

How to Set Up a Slideshow Presentation on a Raspberry Pi

This guide will walk you through setting up an automated slideshow presentation on a Raspberry Pi using feh, a lightweight image viewer.

Step 1: Install feh

First, you need to install feh. Open your terminal and enter the following command:

sudo apt-get install feh

Step 2: Create the Slideshow Script

  1. Create a new script file. Open the terminal and enter:

    sudo nano /home/pi/Pishow.sh

  2. In the nano editor, type or paste the following script:

    #!/bin/bash

    DISPLAY=:0.0 XAUTHORITY=/home/pi/.Xauthority /usr/bin/feh -q -p -Z -F -R 60 -Y -D 15.0 /home/pi/Pishow

    sleep 10

    This script sets up feh to display images in fullscreen, refresh every 15 seconds, and ensures it has the right permissions to display on your screen.

  3. Save and exit the nano editor by pressing CTRL+X, then Y, and Enter.

Step 3: Configure the Script to Run at Boot

  1. You need to edit the rc.local file to run your script at boot. Enter the following command:

    sudo nano /etc/rc.local

  2. Add the following lines before the exit 0 line:

    sudo bash /home/pi/Pishow.sh

  3. Save and exit as before.

Step 4: Reboot Your Raspberry Pi

Reboot your Raspberry Pi to see your slideshow in action. The sleep 10 command ensures there's a delay before the script starts, allowing other processes to load properly during boot.

Note: Make sure to place your images in the /home/pi directory, or modify the script to point to the correct image directory.