My boss asked me to find a cheap mediaplayer for some stuff at work. That inspired me to build something on my own, using a Raspberry Pi.

My plan is to use udev-rules, to detect usb/sdcard and then launch an image viewer, to display the pictures on the media in fullscreen. I'm considering using a Python script, to launch the actual image viewer and to keep things tidy.

Now, I'm looking for an image viewer that is compact, runs on ARM/RPi and can be set to change picture with the click on a mouse button, in fullscreen.

A plus would be to use the mouse buttons in a way that left click = next picture, right click = previous picture.

migrated from stackoverflow.com Aug 1 '12 at 13:59

This question came from our site for professional and enthusiast programmers.

  • 1
    Yes I like that allot. I want to do something like that form a picture frame.. but am having serious issues with transition speeds (I don't know how to use the OpenGL:ES API or what actually uses it) – ppumkin Aug 1 '12 at 14:05
up vote 12 down vote accepted

There is a very simple image viewer called feh.

It can be installed in Debian:

apt-get install feh

Or Arch:

pacman -S feh

It is a completely cli application and it accepts a wide range of arguments, which you can see by typing:

feh --help

For example, you can quickly browse images in a specific directory like this:

feh -g 640x480 -d -S filename /path/to/directory
  • The -g flag forces the images to appear no larger than 640x480
  • The -S filename flag sorts the images by file name

Left and right arrow keys or mouse clicks navigate through the images.

  • So can you run that from terminal without X? Or does it directly work with X. I read the MAN about it but I am not sure where they are running these comamnds – ppumkin Aug 1 '12 at 14:08
  • You need X installed, but I don't think you necessarily need an X server running. – Jivings Aug 1 '12 at 14:12
  • Thanks! I'll look in to that as soon as I've got another SD-card. – aztekk Aug 1 '12 at 21:32
  • @aztekk Great! If this answers your question well enough then you can mark it as the correct answer by clicking the gray tick. – Jivings Aug 2 '12 at 8:58
  • @Jivings Thanks for this! Sorry for the delay he he – aztekk Aug 22 '12 at 17:37

I don't think you can get any simpler than xloadimage: it's the tool many desktop managers use to display the wallpaper, and it can display images in a new window, full screen, or even load an image into an existing window. It does require X server to run, but so does feh.

If you need a viewer which works without X, I suggest you look into zgv which displays pictures on a framebuffer device directly. Unfortunately, Raspbian doesn't have it packaged, so you'll have to build it from sources. Note that there is an X version of zgv called xzgv, which you can install with apt-get.

  • 1
    Raspbian does package fbi, which is a straightforward, CLI, frame buffer image viewer (the package is fbi) that's popular on the Pi, I think. Dunno why they draw that parallel to vim on the homepage though, maybe because you can control slideshows with keyboard commands, lol. And hey look, it will supposedly even do PDF files on the framebuffer: nongnu.org/fbi-improved/#man_fimgs At any rate viewing of common image types works. – goldilocks Jan 16 '17 at 13:19
  • @goldilocks I didn't know about this one, thanks. I wonder how they decided on the name to get such a search-unfriendly one. – Dmitry Grigoryev Jan 16 '17 at 13:51

You may also be interested in mirage.

sudo apt-get install mirage

It offers more functionalities than feh and xloadimage mentioned in the other answers but it's lightweight as well (lighter than say eog). However it depends on GTK, so not sure it applies to your use case.

To load an image in full screen:

mirage -f yourimage.jpg

To open all the images in a given directory in full screen:

mirage -fs path/to/yourimages/

See the documentation, and this blog post for more.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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