I use Midnight Commander a lot. I depend on it. Over the years, it's gone through a lot of configuration changes. At one point, I had the mc.ext file working nicely so when I had an image file highlighted, and pressed Enter, it would display that file with gqview. Gqview went away, and was replaced with geeqie. I reconfigured Midnight Commander to use geeqie. But somehow, my change disappeared.

Here's what I think happened.

The config files for Midnight Commander are currently in ~/.config/mc. They've been in lots of different places over the years, but this is where they currently live. The file that controls what handles files is mc.ext.

That will push images out to Firefox. Why, I don't know. I've read that file, and it doesn't mention Firefox. But in action, if I hit Enter on a file, it displays it in Firefox, moving Firefox from the window it was open in, and doing other things I don't want to happen.

I think in the past, I edited that file to force images to geeqie. But that's a mistake. Next time there's an upgrade, that file gets overwritten. If you want customised changes to be permanent, you must make them in your local config file.

So I edited ~/.config/mc/mc.ext and changed the Image section to this: