Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Geeqie, open the file I said

While Geeqie is not better than Irfanview, it is native and I've been trying to live with FLOSS. Somehow during the past few years Geeqie has gotten slightly broken and does not always open the exact file I opened from a file manager. So I dug deep enough to fix my problem.

Apparently there is a parameter to open the specific file.

--file=<FILE>|<URL>
    open FILE or URL bring Geeqie window to the top

And of course /usr/share/applications/org.geeqie.Geeqie.desktop (because geeqie.desktop wasn't good enough) does not include that in the Exec line.

Exec=geeqie %F

The spec is a list of files. So perhaps I should have updated the desktop file to call my script, but all I did was write a new script for xfe to associate with the image filetypes.

#!/bin/sh
# File: ~/bin/geeqie1
# Startdate: 2026-01-23-6 10:17
# Purpose: fix geeqie so that it points directly to the file it was requested to open with
# Reference:
#    man geeqie
for i in "${@}" ;
do
    opts="${opts} --file=\"${i}\""
done
eval geeqie "${opts}"

And then I told xfe to open .jpg, .png, and so on with ~/bin/geeqie1.

Comments