5 Answers
5

You can use the command-line fbi app ("framebuffer image viewing"). The framebuffer is also what oxmplayer uses. Fbi is available from the raspbian repos and should be in any other GNU/Linux distro as well; it is not specific to the pi.

It takes a filename or series of filenames, and you can use shell globbing for this, so e.g.:

fbi *.jpg

Will show all the .jpg files in your current directory. For instructions on how to advance from one picture in the list to the next, see the KEYS section of man fbi. You can also set an automated slideshow with the -t option.

You may get this error:

ioctl VT_GETSTATE: Invalid argument (not a linux console?)

Even when logged in on a VT. The solution is to specify the framebuffer device, which should be:

fbi -d /dev/fb0 [...]

If you are using ssh, try:

fbi -T 1 [...]

Where "1" is the number of your current VT ("virtual terminal", aka. VC, "virtual console"; these are accessed via ctrl-alt-F[1-6]). You do not have to be logged in on the VT where the image will be displayed, so you can log in remotely and use this to put images on a display attached to the pi (presuming the correct VT is on screen). -T is not in the man page, but it is listed with fbi --help.

Note you cannot use this to view the image on a remote terminal; those aren't associated with the framebuffer.

A couple of other useful options are -a, which will zoom the images to fit on the screen if they are too large, and --edit, which allows you to rotate images (I believe they are then saved with that rotation, you may want to check that if it presents an issue).

Thanks. I have tried fbi -d /dev/fb0 photo.jpg but I still get the error that you mention. I'm logged into the Pi via SSH from Kubuntu Linux's Konsole terminal emulator. Have you any ideas how to fix this?
– dotancohenAug 9 '13 at 15:47

1

You're right -- in fact the intuituve -d /dev/tty1 does not work either, but some googling revealed -T 1 (open via VT1) which is not documented in the man page :/ So try that (presuming it is the first VT that you see on the screen); I will edit something in above, and let me know here if it worked.
– goldilocks♦Aug 9 '13 at 16:04

Thank you. Interestingly, I did google around but did not find the -T 1 flag. Although using the command does in fact prevent the not a linux console? message, no image appears! Perusing the man page does uncover: "fbi also needs access to the linux console (i.e. /dev/ttyN) for sane console switch handling. That is obviously no problem for console logins,but any kind of a pseudo tty (xterm, ssh, screen, ...) will not work." Even dropping out of tmux didn't help. Do you say that you have managed to display images via SSH without X?
– dotancohenAug 11 '13 at 6:55

No, you cannot view the framebuffer remotely, you can just control it.
– goldilocks♦Jun 15 '15 at 13:12

I found I needed to to use -T 1 to give fbi a VT it doesn't seem to matter which one

-noverbose was because I don't want text showing

I was running that command from within X11 which did have the side effect of temporarly overwriting the X11 buffer but the op and myself won't be running X11 it's not a issue, I was just testing the fb device for now

I don't really care about control as I just call fbi again when I want to show the next image