My current code crashes with an Argument list too long error when pointing to a directory containing more than ~1000 photos, for example:
Code: Select all
#! /bin/bash
cd /home/pi/all_photos/
IFS="
"
sudo fbi -readahead -cachemem 10 -a -u -t 1 find -iname "*.jpg" Code: Select all
fbi -a -u -t 1 find "/home/pi/all_photos/" -iname "*.jpg" -print0 | xargs -0Code: Select all
using "DejaVu Sans Mono-16", pixelsize=16.67 file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)Next, I tried using a for loop but this wasn't random and requires user input to continue to the next image; I can't figure out a way to automatically and randomly loop through all images in all folders:
Code: Select all
for FILE in $(find /home/pi/all_photos/ -name *.jpg -type f); do
fbi -a -u -t 1 "$FILE"
doneThe options:
1) Get xargs working with fbi image viewer
2) Use xargs with fim (fbi improved) - but I think the same xargs error will occur (?)
3) Improve the for loop method to automatically and randomly display different images every 5 seconds or so
4) Take a completely different approach!
Any thoughts?