The officially official Devuan Forum!

You are not logged in.

#1 2021-02-25 15:12:36

Registered: 2017-05-07
Posts: 677  

MS application on Wine will not open its files


I run on an up to date Devuan Beowulf ...

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

... and have two MS based applications of which I am very fond of (Pegasus Mail and IrfanView), both running on Wine.

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

I'm having a problem loading the files I open with IrfanView as the files' Properties > Open With drop down menu does not list IrfanView (I have to look for it in Other Application but even then, once selected, it does not 'stick' and the drop down menu stays empty.

This causes that any IrfanView file (a huge list of graphic files) will not open like it should ie:on a mouse click and IrfanView will open but with no file loaded.
I have to open it via File > Open in the IrfanView menu.

Any idea on how to fix this?
Thanks in advance.



#2 2021-02-26 02:56:37

Registered: 2018-02-04
Posts: 194  

Re: MS application on Wine will not open its files

You didn't specify which file manager you are using, so I will assume this is with Thunar, the default file manager in Xfce, which I think is the default desktop environment for Beowulf. Thunar follows multiple XDG specifications, including the desktop file spec.

If you would like Thunar (and other Xfce applications in general) to easily recognize Irfanview as an application that handles various mimetypes, you can set up a file at /usr/share/applications/irfanview.desktop (all users) or ~/.local/share/applications/irfanview.desktop. Make the contents resemble (source):

[Desktop Entry]
Comment=View graphics
Exec=/usr/bin/irfanview %F
GenericName=Graphics Viewer

Adjust the binary name in the Exec line to point to your script that invokes Irfanview, or perhaps the whole wine invocation, although files with spaces in their names could get messy. For example, it could be

Exec=/usr/bin/wine "C:\Program Files\Irfanview\iview64.exe" %F

The %F in the Exec line is important, because that will tell XDG-compliant applications that it can pass multiple files to the program at the same time. Irfanview, when given multiple files, will let you scroll between just those multiple files.

The MimeType line is also very important, because it tells $SOMETHING (I am not entirely certain) what filetypes should list this application in the "Open with..." pre-filled list. But the "Other application..." dialog will show all /usr/share/application/*.desktop files that have a %F or %f in the Exec.

I forget what command you need to run to update the caches or menus so everything initially becomes aware of the changed .desktop file. A logout usually does it too. Maybe somebody can rescue me from my strange gap in knowledge.

I disavow responsibility for troubleshooting spaces and quotes in the Exec line of a .desktop file!

This space intentionally left blank.


#3 2021-02-26 05:08:26

Registered: 2020-11-22
Posts: 354  

Re: MS application on Wine will not open its files

bgstack15 wrote:

I disavow responsibility for troubleshooting spaces and quotes in the Exec line of a .desktop file!

I dont blame you!! Few weeks ago i couldnt understand what i did wrong to a .desktop file to make it stop working, low and behold it was a 1 byte space in front of the Exec line!!

Do good things.  Share.  Be helpful.  Be decent.  Live large.


Board footer