Introduction: Easy Raspberry Pi Based Screensaver/Slideshow for Exhibitions/Store Front
At exhibitions you often want to show off your work in the hopes of attracting new potential customers. This also works for the windows of stores to advertise products on sale within. Most will simply create a large fixed image poster at great expense and use this for long periods of time. Sometimes much longer than the product in question is on promotion.
Using modern technology it is possible to create a dynamic animated display for approximately the same cost as the fixed image poster.
Modern flat screen TVs are relatively large and thin so it really opens up the possibilities in terms of where you can put them. If a TV isn’t doing it for you then for a bit more cash you could use a projector in exactly the same way.
The guide below describes in step by step detail how to create one of these displays using a flat screen television and a Raspberry Pi. Displaying dynamic animated content such as video is also possible but is not covered in the scope of this tutorial.
Step 1: The Raspberry Pi
The Raspberry Pi is a very small single board computer with a very low price tag. It is a relatively powerful device and has the capability to output HD video so it makes great sense for use in the project. Also most modern HD TVs feature USB support so in some cases they are able to power the Pi directly. The Pi is also small enough to be attached directly to the back of the TV so all the customers will see is the TV and maybe the TV’s power cable.
The Raspberry Pi hardware runs a Linux based operating system which puts off a lot of potential users due to unfamiliarity but using my instructions below it should be fairly simple to create a working system and start your introduction to the world of GNU Linux. To load your pictures you simply place them onto a USB memory stick, put the stick in the Pi, power it on, press a couple of keys on the keyboard and off it goes.
Step 2: Items You Will Need
- Large TV with HDMI support
- Raspberry Pi B or B+ (the one with the Ethernet connector)
- SD Memory Card, Capacity >= 4GB, Class >= 10
2A Micro USB Cable (95% of Micro USB Cables will not supply enough current due to resistance of the cable so make sure you get the right type of cable, genuine phone charger cables often work well)
- USB socket on TV or Micro USB Charger Rated @ 2A
- USB Mouse and Keyboard (I used a Raspberry Pi compatible wireless combined mouse and keyboard from Amazon)
- USB memory stick (containing the images you want to display)
- HDMI Cable
These additional items are required for setup only
- Hub/Router with Internet Connectivity
- Ethernet Cable
- Computer / Laptop with SD card reader
Step 3: Configuring the SD Card
The SD card needs to be configured before it is inserted into the Pi. To do this you will need a computer with an SD card socket.
You will first need to download the Linux installation and copy it to the card.
Download the latest version of the operating system Raspbian Debian from RaspberryPi.Org
http://www.raspberrypi.org/downloads/
Then write the OS onto the SD card using the techniques described here:
Windows Based Installation -
http://www.raspberrypi.org/documentation/installat...
Mac Based Installation -
http://www.raspberrypi.org/documentation/installat...
Linux Based Installation -
Step 4: Connecting Up & Powering On
Once the OS is loaded onto the SD card remove it from your computer and insert it into the Raspberry Pi. While your at your computer you can also put your images into the root folder of the USB memory stick before connecting this to the Pi.
Next connect the HDMI cable between the Pi and the television and the Ethernet cable between the Pi and the Router. Next connect the mouse and keyboard to the Pi and finally the USB power cable.
Ensure that the TV is switched on before switching on the Pi or there is a chance that the HDMI interface will not start up. If this happens simply remove power to the Pi, switch on the TV and try again. If the TV is powering the Pi then the Pi should automatically come on when the TV is switched on.
Step 5: Installing the Software
After a minute or two you should be faced with a simple desktop type environment similar to the mage shown above.
Feel free to have a browse around, and if it’s your first time then welcome to the world of free software! If anything goes wrong you can always return to step one and rewrite the image on the SD card using your computer.
To continue with the tutorial we will be using the terminal application. To run this you simply double click the LxTerminal shortcut on the desktop or find it in the Start type menu at he bottom left hand corner.
First we install the image display software feh by entering in the following command and hitting return.
sudo apt-get install feh
sudo = run as super user to allow installation
apt-get = download the latest package from the internet
install = install the application
feh = application to download and install
Once the installation of feh is complete repeat for the screen saver application using the command below.
sudo apt-get install xscreensaver
Step 6: Configuring the Screen Saver
The next thing we need to do is to configure the Pi’s screensaver. By default the Pi will automatically switch off the screen after a few minutes on inactivity on the mouse or keyboard, as we want to display a set of banner images for a long period of time without interaction we need to switch this default behavior off. You do this by going to the Start type menu at he bottom left hand corner, selecting Preferences and then Screensaver.
Set the blank out time to 720 (the max allowed time). You must remember to wiggle mouse or press a key on the keyboard at least every 12 hours if you want a constant display. For a permanent display without interaction you could use a embedded USB microcontroller to simulate mouse movement every few hours to ensure screen blanking doesn’t kick in. Using Flowcode and a device such as a MatrixTSL ECIO40P this would be a 5 minute job.
Step 7: Running the Slideshow
Returning to the terminal application we can now fire up the slide
show by entering the following command. Don’t worry you won’t have to type this in every time!
feh -Y -x -q -D 5 -B black -F -Z -z -r /media/
To end the slide show press the q key on the keyboard.
You can refer to the manual on the feh application by typing this into the terminal.
man feh
Here is the explanation of the parameters used in our reference command.
-Z Auto Zoom
-x Borderless
-F Fullscreen
-Y hide pointer
-B image background
-q quiet no error reporting
-z Randomise
-r Recursive search all folders in folders
-D Slide delay in seconds
Step 8: Shutting Down and Powering Up
If you simply pull the power from the Pi then there is a chance the SD card can be corrupted which may mean it will not boot the next time you come to use it. To try and avoid this remember to shut down the Pi before removing power. As a precaution it might be advisable to have multiple SD cards ready just in case one were to fail to boot on the day of the exhibition.
When you boot the Pi back up and you want to fire up the screen saver simply open the terminal application and then press the up cursor arrow on your keyboard to recall the last entered command before hitting enter to execute the command.
Step 9: Securing the Pi to the Back of the TV
The Pi can be affixed to the back of the television using hook and loop tape or double sided tape.If you don’t want to use tape then there are cases designed for the Pi with small sucker feet which can secure it to a surface like a TV.
The various wires can be neatened up and held in place with a few cable ties. Be careful when manipulating the HDMI cable, there are a lot of very thin wires inside it and you don’t want to snap one! It wants to be positioned so it’s not flapping about but also so it’s not taught or kinked.
Step 10: More Projects
For further information and other projects please visit our website at the following address:
www.rowlandtechnology.com/projects/
Thanks for viewing.
34 Comments
Question 1 year ago
Hi--
I am using my pi to play music. It is connected to a streaming service, using my TV as my monitor. I want to have a screensaver playing images on the TV while the music plays. It will usually run for an hour or two before stopping. feh mostly works fine for what I want, but its randomization is poor. It claims to make a random list of images each time it starts, but it will often display the same image more than once while the music is playing. (It has a library of over 3000 pictures to call upon, so it does not run out.) I have decided to display them in order and remove the randomize flag. This guarantees no duplicates.
I wonder if there is a way to get it to resume at the same place it left off? I sure don't see it in the man pages. Is there a better way to get this to work? Or is a different screensaver the answer?
Thanks much!
2 years ago
Hello, the tutorial here works really great but my pictures are always displayed in landscape format. How can I display images in landscape and portrait format? Greetz neumier
2 years ago
hi im new to this and i just did my slideshow. the only problem i have now before i use it on display is that the images and text look white out and the picture lack definition. i dont know if why but the images are saved in jpg format. also can it read pdf? any help would be great
4 years ago
Great instructable - thanks!
There were three changes I really wanted to make, and I've sorted two of them out so far...
- I wanted it to never screen blank.
- I wanted it to auto-start with no need for keyboard and mouse.
- I'd like it to do a dissolve/fade from one image to the next.
The screen blanking problem was the easiest. In the ScreenSaver preferences GUI under the "Mode" drop-down menu I simply select "Disable Screen Saver". That seems to work great.
For auto-starting I create a shell script on the desktop called startup.sh. It runs the feh command...
<start> (this is NOT in the file)
# sleep for a few seconds to give the USB drive a change to mount before running the slideshow
sleep 5
feh -Y -x -q -D 5 -B black -F -Z /media/pi/0D18-4F37/
<end> (this is NOT in the file)
I then edit the "autostart" file in /home/pi/.config/lxsession/LXDE-pi by adding this line at the end to execute the above script:
@/home/pi/Desktop/startup.sh
This does the trick.
I haven't figured out how to do a fade from one image to the next. I don't think feh supports it.
Reply 4 years ago
I want to do exactly this, I even named the file startup.sh and placed it on Desktop.
However it doesn't work, meaning nothing happens.
Here is what is in my autostart file (nano .config/lxsession/LXDE-pi/autostart):
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
@/home/pi/Desktop/startup.sh
Can you share your autostart file?
Reply 4 years ago
Nvm, had to make the file executable. Now it works!!!
Thank you so much!
Reply 4 years ago
Sorry I missed your comment. Glad you found the solution.
6 years ago
I made similar kind of Pi display couple years ago. In my build feh is started on startup and images are displayed from attached thumb drive.
https://tjutzu.kapsi.fi/wp/raspberry-pi-usb-picture-frame/
Reply 4 years ago
Hi, did you wrote a service file script for the same. Did you got
Reply 4 years ago
I made it as described on my instruction. I have not made any changes to it since as it still works for me. I have not updated neither rasbian or feh since.
5 years ago
Hi, hope someone can help me out here:)
I followed the tutorial, but after i enter the feh -Y -x -q -D 5 -B black -F -Z -z -r /media/ code in terminal, it says "feh: no loadable images specified". I tried different maps, with or without an image (png) in it, but I always get this same error!
Reply 4 years ago
I'm also getting this error, did you ever figure it out? (any help would be greatly appreciated I'm doing this for a college final project)
Question 4 years ago
rpi does not support 4k resolution. max out at 1080p. im using the odroid c2 now which supports 4k. but sadly your instruction doesnt apply to the c2. could you please update with instructions for the c2 please?
6 years ago
I am trying to autoload new content uploaded to a Google Photos Album into a full screen slideshow. If anyone knows of a script/extension that’ll do this automatically keeping the slideshow in fullscreen without refresh the browser and manually restarting the slideshow on a Raspberry Pi please point in that direction. Please...
Reply 5 years ago
Hi there! I'm currently trying to do this. Did you find a way to do this?
5 years ago
Take a look at DAKboard (https://dakboard.com) for the software side of this. It adds time, weather, calendar, news and more! Works great on the RPi!
5 years ago
Thank you very much - interesting. I will buy a RaspberryPie and will try this (for the first time). Never too old to learn!
I think its not quite what I am after - would like a rasberry pie that after initially programmiung you never have to communicate with it and can work if you turn the power on/off, and ideally perhaps/maybe get the images form a USB.
I can see (but dont know how) you may modify the Linux to autostart a program (feh) if a USB is mounted, but the possability that switching the power off/on may damage the s/w would be a problem. Do you see any way round this please ?
6 years ago
How to write script If I want display just one image
Reply 6 years ago
feh then the file path with th file name you can also add i those letters for the desired effect in between feh and the file path
Reply 6 years ago
Thanks for your reply..its working..can you please tell how to kill feh using shell script or python script