3

I'm running Ubuntu 18.04 (x86_64, kernel 4.15.0-50-generic). The default image viewer is EOG.

In a directory I stored some images and a text file for each image, with the caption.

  1. Is it possible to display both the image and the caption with EOG?
  2. If not, is there any other image viewer which can do this?

1 Answer 1

3

I use Kubuntu 18.04 which has Gwenview as its image viewer. It's available in the repositories but it may pull in quite a few dependencies if you haven't already installed other qt-based applications. Run apt install -s gwenview to see if you're comfortable installing it.

enter image description here

Gwenview doesn't display a text file and the corresponding image together but it has a sidebar in which you can enter a description of your image by typing or pasting content in the Description box.

In the following composite,

  • the first image has the description area blank
  • the second, third, and fourth images have small descriptions.

Gwenview showing descriptions of images


Gwenview uses something called "extended file attributes" to store information you enter in the Descriptions box. I learned that here.

If you decide you want to extract all the descriptions, you can. First install xattr from the Universe repository.

Description: tool for manipulating filesystem extended attributes

Then, run

xattr -l *.png

from the folder containing your images, assuming them to be .png.

You'll get a consolidated output like this:

01-default.png: user.xdg.comment: This is the default color scheme of the Ranger file manager.  
02-jungle.png: user.xdg.comment: Jungle is another color scheme included when you install Ranger.  
03-snow.png: user.xdg.comment: This is snow, the third color scheme included with Ranger.   
04-solarized.png: user.xdg.comment: This is solarized. This color scheme isn't included with Ranger.  

I haven't addressed the following issues because I don't understand much about extended file attributes myself:

  • where this information is stored
  • whether the information can be accessed by other programs
  • the maximum length of material you can include in the description

but the following links could be of use:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .