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?

Jacobm001
  • 11,904
  • 7
  • 47
  • 58
Saman
  • 41
  • 1
  • 1
  • 3

4 Answers4

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.

Jacobm001
  • 11,904
  • 7
  • 47
  • 58
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
mykhal
  • 111
  • 4
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.
Gabriel
  • 111
  • 5
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
Tommaso
  • 11
  • 1