How to associate file types with wine in nautilus

Solution 1:

In ubuntu 13.04 The wine is designed to be hidden, defined in the wine application launcher property NoDisplay=true in /usr/share/applications/wine.desktop file. You're not supposed to disable this property.

To install (and uninstall) windows application you just need open the Dash Home and type wine in searching box. You will see "Uninstall wine Software" icon. Click on it to open the window and you will see "Install" button. Run the window installer using this.

During the installation, wine will automatically create ubuntu application launcher file (*.desktop) at ~/.local/share/applications/.

After installation you will able to launch the window application from Dash Home - just type the name of application on the searching box, you will see the icon of the application is appeared, if you see nothing, try to log off and log on then try again. Once the application is launched, you can lock the icon on the launcher (just right click on the icon and click "Lock the launcher").

In case you want the window apps available in the "Open with" application list, you just need to add %U in the "Exec" property of the application launcher file (*desktop). This is a snippet of my notepad++ application launcher (~/.local/share/applications/wine-Programs-Notepad++-Notepad++.desktop), I add%U at the end so I able to open any file using Notepad++:

Exec=env WINEPREFIX="/home/ ... Programs/Notepad++/Notepad++.lnk %U

NOT RECOMMENDED

In case of you are insist to be able to launch windows application directly from Files(aka Nautilus), ie: portable application, you can add the following line into /usr/share/applications/defaults.list

application/x-ms-dos-executable=wine.desktop

This configuration will cause the *.exe file is launched when you are double click the file, similar the cli command

$ wine some_app.exe

PLEASE DO NOT USE THIS METHOD TO LAUNCH THE WINDOWS INSTALLER.