irfanview 4.51 in 32-bit wine as default image viewer

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

irfanview 4.51 in 32-bit wine as default image viewer

#1 Post by perdido »

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 :)
Attachments
defaultimageviewer.tar.gz
Extract and place in /usr/local/bin/ directory
first make a backup of the existing defaultimageviewer file
(226 Bytes) Downloaded 267 times

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#2 Post by mikeslr »

Very nice, perdido.

Your instructions regarding how to set a window application as a default handler solved a problem I've had for some time -- wanting to use InfoCentral as the default contact manager.

I'm placing a link to your post in the Virtualization Section.

kuman11
Posts: 248
Joined: Tue 26 Dec 2017, 09:32

Is there irfanview 4 Linux w/o Wine?

#3 Post by kuman11 »

I like irfanview a lot, it not as complicated as mtPaint & useful for quick edits.

XP Refugee
Posts: 63
Joined: Wed 14 May 2014, 20:19

code

#4 Post by XP Refugee »

can I just cut and paste in that code in green? Still ain't got the hang of tar gz n such.

ITSMERSH

#5 Post by ITSMERSH »

Here's what I'm using now for years to send .cpt files to Corel Photopaint 8.

Code: Select all

#!/bin/sh
exec wine start /Unix "/root/.wine/drive_c/Corel/Graphics8/Programs/photopnt.exe $@"
I'm using a wrapper script on this to load the Wine SFS automatically at first call.

kuman11
Posts: 248
Joined: Tue 26 Dec 2017, 09:32

#6 Post by kuman11 »

There's some trick to run Wine in RAM, w/o installing it on the usb stick first?
Like the way u run F-fox Quantum with a simple ff script?
Last edited by kuman11 on Thu 08 Nov 2018, 03:53, edited 1 time in total.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

Re: code

#7 Post by perdido »

XP Refugee wrote:can I just cut and paste in that code in green? Still ain't got the hang of tar gz n such.
How to extract.
Assuming you are using Rox filer for file manager.....

If the Rox filer in Lxpup has right click options (probably does if its less than 3 years old) then you can use Rox to extract.

If you download the .tar.gz and right click it in Rox and click on Uextract in the right side window, click "OK" it will extract to its own directory. :)

Your path to the i_view32.exe file needs to be the same. If the path to that file is different you would have to change it to what your path to that
file is. If your path needs to be changed, then using Rox just right click the file, choose "open as txt" and make changes and save.

----------------------------
Now to answer your question, yes you can cut and paste but the file you make or copy to needs to be an executable script when you are finished.
And also have the correct path to the i_view32.exe and have the correct name (defaultimageviewer) and location ( /usr/local/bin/defaultimageviewer

If you don't care for Rox as file manager I recommend XFE, it is very similar to the old windows explorer and can
extract files & also make files executable by changing "permissions", among other things.

.

kuman11
Posts: 248
Joined: Tue 26 Dec 2017, 09:32

#8 Post by kuman11 »

I guess no one knows some tricks regarding wine ...

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#9 Post by mikeslr »

kuman11 wrote:There's some trick to run Wine in RAM, w/o installing it on the usb stick first?
Like the way u run F-fox Quantum with a simple ff script?
Hi kuman11,

I'm not sure I understand your question. Obviously, both Wine and any program you want to run employing it must be somewhere that Puppy can access.

Wine doesn't have to be installed into Puppy. shinobar and the japanese team developed portable-wine, http://murga-linux.com/puppy/viewtopic. ... 297#755297 and when version2013 published wine version 3.3, I repackaged portable-wine, replacing the older wine version with it. It's available from here: http://murga-linux.com/puppy/viewtopic. ... 245#989245.

This seems to be very similar to what you had in mind. To use it from a USB-stick, merely unpack the tar.gz anywhere on the stick --recommended on the same partition as Puppy if you have more than one partition. Then Right-Click the unpacked folder and select Register. Links to it, including Menu entries, will be made within Puppy. But read the portable-wine thread for details as to how using it differs from an "installed Wine".

With portable-wine, programs which have to be installed will be written into the portable-wine folder rather than within "Puppy Space".

But many Windows programs don't have to be installed. They are designed to run as portables so that you can put them on a USB-stick. Some portables refuse to install into Windows, and equally refuse to install into Wine's program container. They can only be run from an external folder.

There are portable versions of irfanview. What I do is create a folder on the USB-Stick named xp-apps. When the setup.exe file is executed you're asked where you want the program to be "installed". I select the xp-apps folder.

You could also place irfanview in such external folder if you use "installed wine".

One of portable-wine's Menu entries, on the System subMenu, is named Wine Windows Program Loader. It provides access to any "installed" program. For portable programs you have to file-browse to its folder and click the executable. But you can create menu entries to them, and to installed programs as well. See http://www.murga-linux.com/puppy/viewto ... 255#882255 and http://www.murga-linux.com/puppy/viewto ... 570#988570. When creating your own menus, there are only two differences between using wine and portable-wine: (1) the path to the executable may be different; and (2) the wine command is "wine", without the quotes, while the portable-wine command is "wine.sh" without the quotes.

You can also "mix & match". With a Puppy on a hard-drive using wine or portable-wine, you can browse to the executable of a portable windows program on a USB-stick and start it by clicking; and with Puppy on a USB-Key using wine or portable wine on that Key, you can browse to the executable of a portable wine on a hard-drive and start it by clicking.

kuman11
Posts: 248
Joined: Tue 26 Dec 2017, 09:32

re:

#10 Post by kuman11 »

Hi mikeslr,

I didn't know there's a portable wine. The other used to crash my installation. That's exactly what I looked for. It seems similar to the portable browser.

Btw do u know of a program which can recognize exFat USB sticks in Puppy?

Thanks a lot!

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Which Puppy recognizes exFat Formatted drives

#11 Post by mikeslr »

Hi Kuman11,

"do u know of a program which can recognize exFat USB sticks in Puppy?"

You really should start a new thread for this question as it only distantly related to your original one about irfanview. Probably in the 'User's' Section because:

I may be wrong, but I think whether or not a Puppy can recognize an exFat partition depends on whether the kernel used was compiled with the capability of recognizing that format. In other words, it's not an application you can install. On the other hand, you can change a Puppy's kernel. Add that my flaky memory seems to recall a post indicating that while some Puppies could use exFat partitions, they could not boot from them. But as I said, I may be wrong.

So it's best to ask in the User's section where lots of people who actually know things 'hang out' rather than on the tail end of a thread just about irfanview.
Last edited by mikeslr on Tue 13 Nov 2018, 19:46, edited 1 time in total.

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#12 Post by Burn_IT »

I think the boot problem was solved as well in later versions.
"Just think of it as leaving early to avoid the rush" - T Pratchett

Post Reply