4

I am making a project about wireless notice board using an android app and a raspberry pi. I am using feh image viewer to display images as slideshow from a specific folder.

The command I am using:

/usr/bin/feh --quiet --recursive --randomize --full-screen --slideshow-delay 7 /home/pi/New

It's displaying properly but has one problem. If I add a new image in the folder it won't display until it is restarted. Can somebody tell any method in which I can to auto reload as soon as something is added? Or is there any other image viewer which is capable of performing the required task?

4 Answers 4

2

According to feh's documentation, the solution is fairly simple. If you add the parameter -R n (where n is an integer), it will automatically reload from the specified directory every n seconds.

2
  • I tried this but its not working in my case . I have found another image viewer called Eye of GNOME .This is doing my work perfectly .Its slideshow automatically shows the new added image without adding anything in command line.
    – Saman
    Commented Nov 25, 2015 at 16:11
  • ...while also resetting the zoom settings every n seconds 🙄; Try feh -R 5 --scale-down <your-img> Commented Dec 13, 2023 at 22:06
1

In my project I upload photos from webcams, so I need to refresh also. Only feh did the job. I first tried with eog but had problems with display timeout: even if I put BLANK_TIME and POWERDOWN_TIME to zero in /etc/kbd/config, in the middle of the night the video ignored those parameters and became blank. This didn't happen with feh.

feh -Z -F -R 5 -Y /home/pi/photos
1
 --auto-reload
             (optional feature, enabled in this build) automatically reload image when the underlying file changes.  Note that auto-reload (if enabled in the build) is on by default.  This option is only useful to re-enable auto-
             reload after it has been disabled by a preceding --reload=0 option.
1
  • Note that this does not reload entire filelists in case you have opened an directory in feh and added more images to that directory afterwards. Commented Mar 4, 2021 at 18:11
1

Given directory $d where new images are being created, for displaying the images as they appear, starting from the freshest one, I'm using

feh -S mtime --reverse -D 1 -R 1 --on-last-slide hold --start-at $(ls -1tr "$d" | tail -n 1) "$d"

(I'm not sure how it performs for huge amount of images, as it is short-periodically reloading the list)

Options used:

  • -S mtime sorts images by their modification (creation) time
  • --reverse reverses the sort order (as default is descending, for some reason)
  • -D 1 slideshow delay 1 sec
  • -R 1 regenerates image list every 1 sec
  • --on-last-slide hold to stop on last image, not quit or restart
  • --start-at $(ls -1tr "$d" | tail -n 1) starts the slideshow with the newest one
1
  • I think this answer answers the question best. I shows an image which got added to a folder with a different filename. Thanks Commented Jul 23, 2021 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.