Hello:
OK.
This* seems to work:
1. create a file irl.sh in your ~/ folder
Code: Select all
#!/bin/bash
echo "start..." > /tmp/irl.log
F="z:"${1//\//\\}
echo "F=$F" >> /tmp/irl.log
wine "/home/groucho/.wine/drive_c/Program Files (x86)/IrfanView/i_view32.exe" $F
a) The two echo lines are for temporary debugging, they will log what is going on to /tmp/irl.log and can be removed (or not) afterwards.
b) It is critical that the path (part between quotes in the last line) is the path to the IrfanView executable in your system and when executed in a terminal actually opens an empty IrfanView instance on the desktop.
If not, check the path for mistakes (typing, extra spaces, bad returns, etc.) and try again.
2. Make the script executable.
3. Create a irfanview_launcher.desktop.desktop file in ~/.local/share/applications/ :
Code: Select all
[Desktop Entry]
Version=1.0
Name=irfanView Launcher
Comment=File Viewer
Exec=/home/user/ir.sh %F
Icon=gtk-image
StartupNotify=true
Terminal=false
Type=Application
Categories=GTK;Graphics;Viewer;
GenericName=IrfanView
MimeType=image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;application/postscript;image/png;image/x-icon;image/x-xpixmap;image/x-exr;image/x-webp;image/heif;image/heic;image/svg+xml;application/pdf;image/x-wmf;image/jp2;image/x-xcursor;
a) the Exec= line should be the path to the previously created executable script (irl.sh) in your system.
b) the Icon= line should be the path to a 32*32 irfanview icon in your system. eg: in your /home folder
When this is done, right-click on a graphics file on the desktop or Thunar and do:
Properties -> Open With -> and select "irfanView Launcher.desktop" and check off the make it default option.
Do not select "IrfanView x.xx" which will not work, make sure you select the created launcher.
If it is not in the list, select "Other Application" at the end of the list and find it there.
Reboot or restart the desktop to ake sure these settings take effect.
What I do not understand is why this has to be done in this manner.
Any other way?
* NB:
The solution I am posting here originates in the link to the blog I posted previously plus additional elements from these other ones:
https://forum.xfce.org/viewtopic.php?id=13061
https://forum.xfce.org/viewtopic.php?id=14753
Thanks for your input.
Cheers,
V.