Just discovered IrfanView can be installed through Synaptic even though it is still a Windows program running in Wine. That is fine I have used it in Wine for years but since I now know it is in the repos and have installed the official PCLOS version I figure I can now "legally" ask this question.

As it stands IrfanView will not automatically open an image file when you set it as default viewer. Just the program opens then you have to open the image file from within IrfanView. Years ago I used a script to do this in PCLOS but the script stopped working at least two or three years ago. An Internet search has turned up no solution, just the same script. I'm hoping that someone can tweak the script so when I click on an image IrfanView automatically opens the image. I had hopes that the script would work with the version from the repos but no luck setting default to the script. (Yes, I have set the script to executable.)
Here's the script:
#!/bin/sh
IRFANVIEW="C:\\Program Files\Irfanview\i_view32.exe"
ROOT_DRIVE="Z:\\"
for arg
do
wine "$IRFANVIEW" "${ROOT_DRIVE}$(echo "$arg" | sed 's/\//\\/g')"