Linux and Image Viewer

Linux and Image Viewer

Aug 08, 2024

Debian Linux and Image Viewer

The task was to launch an image viewer from a Bash script from within the terminal window to show me the image I was currently working on. However, I had forgotten that I already have a pre-installed image viewer.

I tested some viewers and present my conclusion here. Not all of the later on listed worked out of the box as expected. Some image viewer did not show my test image of high resolution as I expected that.

  • display (when ImageMagick is installed)

  • eog

  • feh [--scale-down]

  • fim

  • gwenview

  • sxiv

  • viewnior

  • xviewer

The following ones are more than a simple image viewer. But they could use though from case to case.

  • geeqie

  • gthumb

  • mirage

  • nomacs

  • ristretto

All of the above listed image viewer can be installed the same simple way without further knowledge.

sudo apt-get install [image-viewer-name]

In addition to the viewers mentioned and tested, there are a large number of viewers that I have not or not yet tested.

I will take a closer look at the installed image viewers mentioned above and then decide which one to keep in the end. fim and sxiv are two of the candidates I am not yet convinced of.

Side Note

Sometimes on Linux, we might not be sure what kind of image viewer is installed on our Linux system we are working on. For this reason, we can use the xdg-open tool, which is opening the image in the preferred preset program.

xdg-open sample.jpg

If xdg-open does not find an appropriate program to process the given file, it will exit with the exit code 3.

Alternative Way

As alternative to a image viewer program, an installed internet browser can be used from within a directory or by using a path.

firefox sample.jpg

chromium sample.jpg

Conclusion

Finally I decided to use the preinstalled image viewer xviewer for the moment. It fits for the moment my needs best.

Have a nice day! See you back soon!

Enjoy this post?

Buy zentrocdot a coffee

More from zentrocdot