Raspberry Pie fueling a Picture Frame

 The goal is to have a simple picture frame.

Just load a big bunch of pictures into a usb thumb drive, and fire up this raspberry pie + small screen in order to see a slideshow of these pictures.

The final product will boot up straight to the slideshow, no need for mouse or keyboard, and the screen won't get to sleep mode.

So the basic steps for the installation will be as follows

  • Install OS on the microSD card
  • Run the OS on the RPI
  • Install the image viewer with slideshow mode
  • Configure a batch file to run the image viewer with the right parameters
  • Run the batch file at startup
  • Configure the OS not to go to sleep mode

The main component is the image viewer, there are many options for a command line image viewer

  • pQiv - Best option as it has transitions (fade) between images
  • feh - The most popular
  • eog - Another option
  • fim - Doesn't need a desktop X installed, so it is good for weak RPIs (But needs v0.6 and up for the --resolution 'fullscreen' mode)
  • fbi - Doesn't need a desktop X installed
There are many other options, but the above suffice.

So, if the RPI can support a desktop X (RPI Zero 2?), then I will choose pQiv
If not, then I will use fbi (or fim, if the official release reached v0.6).


  • Install OS for the raspberry (Official Raspberry Pie OS Not Lite for pQiv/Lite for FBI || FIM)
  • Copy pictures to a usb drive 
  • In terminal update the package manager
    • sudo apt-get update
  • Install the image viewer/slideshow
    • sudo apt-get install pqiv / feh / eog / fbi / fim
  • Run image viewer in Slideshow mode:
    • Create file: ~/slideshow.sh and make it executable (Contents of file will be the image viewer of your choice command line)
    • feh --recursive --randomize --auto-zoom --fullscreen --borderless --hide-pointer --auto-rotate --cycle-once --slideshow-delay 5 --image-bg black $TARGET_FOLDER$/ &
    • pqiv -d 10 -s -f -F --fade-duration=1.5 -i --shuffle $TARGET_FOLDER$/ 
    • fbi -noverbose -a -t 5 $TARGET_FOLDER$/*.jpg
  • Configure RP OS to start automatically without the need for a username/pass
    • sudo nano /etc/inittab
    • Comment out line starting with: 1:2345:respawn:/sbin/getty
    • Add below the above: 1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
  • Configure OS not to get to "sleep" mode when it doesn't detect any user actions
    • sudo nano /etc/kbd/config
    • Set blank_time=0 and powerdown_time=0
    • sudo nano /etc/lightdm/lightdm.conf -> Goto section [Seat Default] -> Add the following under it: xserver-command=X -s 0 dpms
    • An Other option is to do the following:
    • nano ~/.bashrc
    • setterm -blank 0 -powerdown 0
  • Auto start image viewer on system reboot
    • sudo nano /etc/profile  --> (at EOF) sh ~/slideshow.sh &
    • sudo nano /etc/rc.local --> (at EOF before 'exit 0') sh ~/slideshow.sh &
    • sudo nano /home/pi/.bashrc --> (at EOF) sh ~/slideshow.sh
    • sudo nano ~/.config/lxsession/LXDE-pi/autostart --> @lxterminal -e /bin/bash ~/slideshow.sh

Bonus Section (Optional, use only if needed)
  • Hide low voltage alerts if needed: sudo apt-get remove lxplug-ptbatt
  • Hide mouse cursor
    • sudo apt-get install unclutter
    • mkdir -p ~/.config/lxsession/LXDE-pi
    • echo "@unclutter -idle 0" > ~/.config/lxsession/LXDE-pi/autostart

Thoughts ?
- Add the option to delete a picture by binding keys
- Use bunded keys for forward/backwards and escape (SAfe shutdown)
- Safely - Shutdown RPI with a button

Popular posts from this blog

Profiling Java @ 2019

Ant Explorer graphical Ant build tool

Shared/Pro/Managed Hosting for your site - which to choose ? (NO AFFILIATE LINKS!)