2

I am trying to use eog (Eye of gnome) to open multiple images from the terminal. When I provide the path to the images as arguments to eog it works, but it displays the images in alphanumerical order instead of following the order of the arguments. For example:

eog Image2.png Image3.png Image1.png

Opens the three images in order: Image1.png Image2.png Image3.png, instead of keeping the order of the arguments. Is there any way to disable this and force eog the keep the order given from the input arguments in the terminal ?

A2020
  • 43
  • 5

1 Answers1

2

I could not find a way to do that in the documentation. However digging into the source code, I found that changing a line can achieve that. Specifically in file eog-list-store.c of the source, in function eog_list_store_add_files,

the line

gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
                          GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
                          GTK_SORT_ASCENDING);

can be replaced with

gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
                          GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID,
                          GTK_SORT_ASCENDING);
A2020
  • 43
  • 5
  • 1
    Thanks for sharing your solution with `eog` :-) `feh` will do this by default, so if you don't want to dig into the source code and compile `eog`, there is an alternative. – sudodus May 22 '20 at 21:39