Setting Windows File Associations in Wine

May 22, 2012 - Reading time: 3 minutes

Wine Association Creator

When running an application in Wine recently I noticed that if my application wanted to open a Word document or Excel spreadsheet it failed because Office isn't installed in Wine, even though I had LibreOffice installed natively in Linux. The same goes for PDF documents which fail because I don't have Adobe Reader Installed, I have Okular already installed in Linux.

When searching the net for a solution all I came across were registry edits and a couple of command line scripts. So I decided to write a simple application in Qt/C++ to make the process easier.

After downloading wineassoc simply double click on the file (you may need to make it executable first, right click and change file permissions) or from a console run ./wineassoc in the directory you downloaded into. From console you can make the file executable using "chmod u+x wineassoc". You will be presented with a window as shown here in the screenshot. Simply select which file extensions you wish to associate to native Linux applications and then click Add >> to move them to the right hand column. When you have selected all the required types, click Apply. Note that wineassoc honours the WINEPREFIX setting and will prompt for confirmation before proceeding.

The extension list is populated using Linux config files, with a few extras added in. If by chance your extension is not shown you can start wineassoc from the console specifying extra extensions manually. For example ./wineassoc abc def would add 'abc' & 'def' to the association list. You can also hover your mouse over an extension type to show what programs are associated to that type.

The program should run on most Linux systems that have Qt 4.8 Qt 5 or later. Please let me know if you have problems with a particular distro and Ill try to look into it. This version has been tested with Wine 4.0.3 & Wine 6.0 and was built using Qt5.

 Download wineassoc using the link below:

Find this utility useful? Leave a comment or consider a purchase from our website.

WineAssoc is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.