How does it work?


The Raspberry Pi motherboard is configured to start up automatically with user pi logged on in a graphical environment.

Pi starts by executing several commands in his /home/pi/.bashrc file. He runs a package of scripts that locate the IP address(es) There may be both a wireless and wired connection. This informatoin is turned into a picture (myipaddress.png) so it can be displayed on the screen legibly.

Pi then calls a script that launches the main slideshow program, feh.

The script starts by generating a random three digit number and then searches through the photos in /mnt/photos for a match. It uses this picture for "start-at" and launches the slideshow.

The display needs to be sent to the desktop envoronemnt being used by pi.

The operative command says:

DISPLAY=:0.0 XAUTHORITY=/home/pi/.Xauthority feh --no-fehbg --auto-zoom --auto-rotate --fullscreen --recursive --quiet --hide-pointer --edit --slideshow-delay $PIXDELAY --start-at $STARTPIC $pdir &

The feh options are all available from the feh documentation on the internet. $STARTPIC is the image chosen using the three digit random number. $PIXDELAY is the duration of eacg slides normally 5 seconds but can be changed. See the section on thumbdrives for the location of the photos. There is no good reason not to let the pixframe run continualy, becasue power consumption is so low. But it sometimes gets hung up so there is a cron script that reboots every night at around 3:00 AM.