Ubuntu – How to associate native applications with file types in WINE

file associationwine

The title says it all. I want to associate native applications with file types in WINE.

Best Answer

Here is how you associate native applications in wine:

From the Wine FAQ

You can associate winebrowser with any file types to achieve the result. winebrowser program uses xdg-open to find the native application for a file type.

You need to create a registry file with these contents to associate .pdf files. Save it as import.reg file in your home folder.

[HKEY_CLASSES_ROOT\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
@="winebrowser \"%1\""

Now import the registry file using this command

regedit $HOME/pdf.reg 

This will open pdf files from Wine applications with the native application which is set as default for a pdf file.