Page 1 of 1

irfanview as system default image viewer using 32-bit wine

Posted: Tue Aug 04, 2020 5:10 pm
by perdido
The original thread from Murga-Linux Forum can be found at the following link, it is recommended reading
https://archive.is/FqyS2

Instructions on configuring irfanview 4.51 in 32-bit wine as default image handler in puppy linux.
This makes a one-click to open with irfanview from your linux file manager/viewer such as ROX, XFE, mmview, etc.

For 32-bit systems. I have not tried this with 64-bit wine or 64-bit puppy linux.

Download irfanview 4.51 from
https://www.irfanview.com/

Download the irfanview plugins from
https://www.fosshub.com/IrfanView.html
(permits looking at many types of files, pdf, txt, etc.)
Download the 32-bit windows installer.

Download the ghostscript gs922w32.exe from
https://github.com/ArtifexSoftware/ghos ... s/releases
(scroll down the page to see the version download)

Now that you have the software, let's go do it.
------------------------------------------------

First you should have a working 32-bit wine install
Wine places its files in /root/.wine/drive_c/

Install the gs922w32.exe (just click on it, wine will install just like windows)
Then install irfanview program (in my case iview451-setup.exe)
Last install the irfanview plugins (iview451_plugins_setup.exe)

Next to make irfanview the default image viewer.
------------------------------------------------

You need a modified /usr/local/bin/defaultimageviewer file.
I have supplied one at the end of this post.
The new defaultimageviewer file is a shell script and contains

Code: Select all

	
#!/bin/sh
FileName="z:"${1//\//\\}
wine "/root/.wine/drive_c/Program Files/IrfanView/i_view32.exe" $FileName 
The line wine "/root/.wine/drive_c/Program Files/IrfanView/i_view32.exe" $FileName
is just telling wine to open the i_view32.exe program and supplies the environmental variable"$FileName"
that represents the file clicked on.
If your path to the i_view32.exe file is different than "/root/.wine/drive_c/Program Files/IrfanView/i_view32.exe"
adjust as necessary.

Make a backup of the original defaultimageviewer

***************
This method can be applied to any other files that irfanview can handle, such as .PDF , .PNG, .WEBM, etc.
If you can't find the appropriate "default" file in /usr/local/bin/ then look in /root/Choices/MIME-types/

Have fun!

The attached file is for using irfanview only. Other windows graphics programs can use this same method, for example ACDSee also works using this method.

Re: irfanview as system default image viewer using 32-bit wine

Posted: Sat Aug 08, 2020 7:15 am
by Geek3579
I tried this package some time ago and found it a great way to get a great Windows app installed and running without hassles. A great idea, and thanks for the extra links to plugins etc.

I also found that I could run other windows programs under the wine version provided, which was a bonus.

However, this all-in-one version seems to load and run significantly slower than using portable wine. I wonder if others have had this experience ?

Re: irfanview as system default image viewer using 32-bit wine

Posted: Sun Aug 09, 2020 2:17 pm
by mikeslr
Geek3579 wrote: Sat Aug 08, 2020 7:15 am
However, this all-in-one version seems to load and run significantly slower than using portable wine. I wonder if others have had this experience ?
May depend on how much RAM you have. Remember wine installs to /root/.wine and /usr/lib which occupy RAM. You might want to try "externalizing" wine. http://www.murga-linux.com/puppy/viewto ... 91#1027791, Mike Walsh's pet makes doing that easier. http://www.murga-linux.com/puppy/viewto ... 46#1033146 :thumbup2:

perdido. I hadn't thought of setting up any Windows program as a default. Nice idea. But, I wonder if the following would work as an alternative to editing a /usr/local/bin file: create a bash-script [say @ /root/my-applications/bin] spelling out the path and executable. Then use Menu>Setup>Default Chooser to select it. Might require that it be typed in.

I know that works if you create a pet which consists of such script, an icon and a desktop file. Don't see why the latter two would be necessary to Default Chooser.
There would be two advantages: Easy to switch back & bash-script can be a template for other window programs.