Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-02-25 21:13:37

Devuan
Member
Registered: 2018-01-10
Posts: 27

Thunar wine'd program file associations

Hello:

A few years back, I posted about a problem I was having with Thunar, Wine and IrfanView.

https://forum.xfce.org/viewtopic.php?id=13061

ToZ pointed the way and everything worked out well.
Worked perfectly well until at one point it stopped working. 8^7 

Here is a transcript of the OP with the up to date data wrt OS, etc.

---

I run Devuan Beowulf 3.1.0 with XFCE:

groucho@devuan:~$ uname -a
Linux devuan 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
groucho@devuan:~$ 

My XFCE version is 4.12 and Thunar 1.8.4, standard out of the box with Devuan Beowulf 3.1.0.

I have IrfanView 4.51 32bit installed running on Wine.
I still have to find something as good and simple as this in the extensive Linux applications repetoire.

groucho@devuan:~$ wine --version
wine-4.0 (Debian 4.0-2)
groucho@devuan:~$ 

I have *.jpg files (and other graphic files) set to open with IrfanView 4.51 but they will not open when I click on them.
ie: the application opens but with no file opened.

I can open IrfanView and do File -> Open or drag the file into the IrfanView window and it will open but not when I click on one any of them.

When I right click on a .jpg file and go Properties -> General and try to set the Open With property, I can choose Other Application and then IrfanView 4.51, but it does not show in the window once I click OK.

----

Like I said, this worked but at somepoint (probably after a dist-upgrade, cannot recall) it did not.

Thanks in advance,

Devuan

Offline

#2 2021-02-25 23:03:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,006

Re: Thunar wine'd program file associations

When you say "stopped working", what part stops working? Does irfanview still start but not load the image? Or does irfanview not start at all?

If the former, can you change the ir.sh file to read this instead:

#!/bin/bash
echo "start..." > /tmp/ir.log
F="z:"${1//\//\\}
echo "F=$F" >> /tmp/ir.log
wine "/home/toz/.wine/drive_c/Program Files/IrfanView/i_view64.exe" $F

...and try again. When complete, post back the /tmp/ir.log file.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-02-25 23:27:40

Devuan
Member
Registered: 2018-01-10
Posts: 27

Re: Thunar wine'd program file associations

Hello:

Again ...  8^D
And thanks for the fast reply.

ToZ wrote:

When you say "stopped working" ...
Does irfanview still start but not load the image?

Yes, exactly.

On clicking a graphics file on the desktop, irfanview will start but the file is not loaded.
irfanview's status bar at the bottom of the window says:

---
No file loaded (use File -> Open menu)
---

ToZ wrote:

If the former, can you change the ir.sh file to read this instead:

#!/bin/bash
echo "start..." > /tmp/ir.log
F="z:"${1//\//\\}
echo "F=$F" >> /tmp/ir.log
wine "/home/toz/.wine/drive_c/Program Files/IrfanView/i_view64.exe" $F

... post back the /tmp/ir.log file.

Done.

But for some reason the log file is not being created.
I ran the script from the desktop and then from the terminal to see if anything came up:

groucho@devuan:~$ cat /home/groucho/irl.sh
#!/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
groucho@devuan:~$ 
groucho@devuan:~$ /home/groucho/irl.sh
groucho@devuan:~$ sudo updatedb
groucho@devuan:~$ locate irl.log
groucho@devuan:~$ 

Thanks for your input.

Cheers,

D.

Offline

#4 2021-02-26 02:22:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,006

Re: Thunar wine'd program file associations

Perhaps the Irfanview_launcher.desktop file is missing or not being used. It's required and you need to use it as the application to open files.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2021-02-26 09:53:50

Devuan
Member
Registered: 2018-01-10
Posts: 27

Re: Thunar wine'd program file associations

Hello:

ToZ wrote:

Perhaps the Irfanview_launcher.desktop file is missing ...

Yes, it was missing, so I generated one:

groucho@devuan:/$ cat /usr/share/applications/irfanview.desktop
[Desktop Entry]
Categories=Graphics;Viewer;
Comment=View graphics
Exec=/usr/bin/wine "/home/groucho/.wine/drive_c/Program Files (x86)/IrfanView/i_view32.exe" $F
GenericName=Graphics Viewer
Icon=irfanview
Keywords=irfan;graphics;image;viewer;batch;
MimeType=x-content/image-dcf;image/png;image/gif;image/jpeg;image/jpg;image/bmp;image/tiff;image/ico;image/vnd.adobe.photoshop;
Name=Irfanview
StartupNotify=true
Terminal=false
Type=Application
Version=1.0
groucho@devuan:/$ 

But the problem was [c]updatedb[/c] does not look in /tmp which is why it did not find the log file, makes sense.
I should have looked directly.

Now I have a  /usr/share/applications/irfanview.desktop (no idea why it was missing).
The Exec= line is verified/correct: it starts IrfanView.
I also have the /home/groucho/irl.sh script as required.

Executing the /home/groucho/irl.sh script opens up IrfanView on the desktop and a log file is created in /tmp:

groucho@devuan:/$ cat /tmp/irl.log
start...
F=z:
groucho@devuan:/$ 

Thanks for your help.

Cheers,

D.

Last edited by Devuan (2021-02-26 10:01:46)

Offline

#6 2021-02-26 10:13:39

Devuan
Member
Registered: 2018-01-10
Posts: 27

Re: Thunar wine'd program file associations

Hello:

ToZ wrote:

Perhaps the Irfanview_launcher.desktop file is missing ...

That was it.
Apparently everything is working now.  8^D

I can now register the file with it's Properties page to open with irfanview_launcher.desktop and then it will do so all the time.

But there seems to be something amiss with the properties page.
I can set it to open the file with irfanview_launcher.desktop (that exact text/no icon) but if I set it to open with "Irfan View 4.51" (that exact text + Irfan View icon) it will not work.

Seems the File Properties page has irfanview registered twice (?) one that does not work properly and the one I added today that does.
I'll have to look into that.

Any ideas?

Thanks a lot for your help.

Cheers,

D.

Offline

#7 2021-02-26 12:44:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,006

Re: Thunar wine'd program file associations

Devuan wrote:

Seems the File Properties page has irfanview registered twice (?) one that does not work properly and the one I added today that does.
I'll have to look into that.

Any ideas?

Yes, that will happen. Once for the regular install of the app and once for our workaround. You can remove the regular installed link by deleting any unwanted Irfanview .desktop files in ~/.local/share/applications/wine/Programs/IrfanView


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB