Loop pictures from a folder and display fullscreen slideshow

14

9

Need a Linux solution for looped slideshow from pictures in some folder. Pictures may be deleted and added, so it's a bonus if it doesn't stop/crash if currently shown picture is deleted.

iElectric

Posted 2010-11-16T19:30:39.820

Reputation: 339

Answers

16

This is going to sound crazy, but it works (better than I expected even) and is not that hard to setup. The idea is to make your viewing program look at a single file and then have a command line process that copies each of your files in your directory to that file you view. I tested this with Geeqie and gthumb and it actually works pretty well. gthumb even can handle the image being updated every second and both supported the name of the file type being different from the actual file type (jpg, png, gif, etc).

So here is what you do:

  1. Make a directory with only your pictures in them.
  2. open a terminal window and change to the directory made in the previous step.
  3. Run this command, substituting 5 with however many seconds you want to wait in between updates.

    while true ; do for i in * ; do cp "$i" ~/slideshow.jpg ; echo $i ; sleep 5 ; done ; done
    
  4. Open gthumb and view the image in your home directory called slideshow.jpg, it should rotate the picture. You can make gthumb full screen now if you need to.

  5. Try adding and removing pictures from the picture directory. It won't actually update until its finished going through the whole directory each time, but it will update. The echo $i is in there just so you can see what picture it just copied into place each time.

When you are ready to stop the slideshow, you can press Ctrl-C in the terminal window.

deltaray

Posted 2010-11-16T19:30:39.820

Reputation: 1 665

1Brilliant. It takes a genius to understand the simplicity. – iElectric – 2010-11-20T13:24:54.930

12

If you use Gnome desktop, then you can use its official image viewer program for slide shows:

eog --slide-show /path/to/picture_directory

With Eog pictures can be removed or added during the slide show. Actually, if you add picture during the slide show, it will be automatically included.

JooMing

Posted 2010-11-16T19:30:39.820

Reputation: 774

1You clearly deserve a medal – Pitto – 2017-12-01T12:22:23.673

1On Ubuntu 16.04 using XFCE desktop, this worked but, while most UI elements were polished (fade-in and out, etc), an unwelcome menu bar was visible at the top at all times, even in full-screen slideshow mode. This will not be acceptable for every use. – Stéphane Gourichon – 2018-05-06T06:51:05.247

Sounds like an out of the box solution to me. – deltaray – 2010-11-29T20:41:56.950

Using this on my Raspberry Pi, I was not able to add or remove files without restarting the slideshow. Not a criticism, just FYI. – Butters – 2014-03-25T16:21:31.600

5

From http://www.instructables.com/id/Easy-Raspberry-Pi-Based-ScreensaverSlideshow-for-E/

using feh

feh -Y -x -q -D 5 -B black -F -Z -z -r /media/

Etienne Low-Décarie

Posted 2010-11-16T19:30:39.820

Reputation: 183

1You also need to add the option -R seconds so that the file list is refreshed periodically. – famzah – 2018-12-28T21:15:45.317

You might also want to add --auto-rotate to rotate images correctly based on EXIF data. – Heinrich Ulbricht – 2019-10-09T10:40:16.513

2

Impressive does the job well, with (or without if you wish) transitions.

Slideshow in random (-X) order with 3 seconds delay (-a 3) and autoquit at the end (-Q) :

impressive -XQa3 *

It's worth noticing that it allows scripting, and is multiplatform.

The only drawback is that it currently crashes if there is a directory in the list of files.

Skippy le Grand Gourou

Posted 2010-11-16T19:30:39.820

Reputation: 1 349

1awesome application! perfect for what I want to do! – warhansen – 2019-06-19T08:58:01.117

If only it allowed to auto-rotate images based on EXIF data. Did not find any option to do this. :( – Heinrich Ulbricht – 2019-10-09T10:48:53.413

2

I found fbi (frame buffer image viewer) quite useful- Simple command, something like :

fbi -noverbose -a -u -t 6 /home/user/location/*

More options available withfbi --help and can be installed, depending on distro with apt-get install fbi

RexFuzzle

Posted 2010-11-16T19:30:39.820

Reputation: 121

Works great from tty command line. – Bobble – 2016-10-19T11:23:08.330

1

This doesn't work when run from yakuake: ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)

– Mitch – 2017-05-19T12:17:31.277

You'll probably have to specify a particular tty, using -T 2 for example to select tty2. You'll probably have to muck around with permissions after that. – Josh Hansen – 2018-04-05T18:27:10.927

Does not work from command line on current Raspbian with screen attached :( Also seems to be lacking EXIF-based auto-rotate feature (I read). – Heinrich Ulbricht – 2019-10-20T21:57:18.003