16

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.

1
  • 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)
    – Piotr Kula
    Commented Aug 1, 2012 at 14:05

3 Answers 3

13

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.

6
  • 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
    – Piotr Kula
    Commented Aug 1, 2012 at 14:08
  • You need X installed, but I don't think you necessarily need an X server running.
    – Jivings
    Commented Aug 1, 2012 at 14:12
  • Thanks! I'll look in to that as soon as I've got another SD-card.
    – aztekk
    Commented Aug 1, 2012 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
    Commented Aug 2, 2012 at 8:58
  • @Jivings Thanks for this! Sorry for the delay he he
    – aztekk
    Commented Aug 22, 2012 at 17:37
1

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.

2
  • 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
    Commented Jan 16, 2017 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. Commented Jan 16, 2017 at 13:51
1

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 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.