Associate File Types with Wine in Nautilus

12.04file associationfile typenautiluswine

I have Ubuntu 12.10 with Nautilus 3.4.2.

After installing wine "apt-get install wine" are exe files still associated with the archive manager.

In previous versions of ubuntu I've always right clicked on the file, choose Properties > Open with > Select an application to open … > Wine.

But since version 12.04 Wine in Programs menu is missing.
I tried it on a laptop and PC, version 12.04 and 12.10.

I found a workaround:
http://vazhavandan.blogspot.cz/2012/12/nautilus-342-open-as-administrator-hack.html

But I wanted to find a correct solution, Im installing ubuntu to users, and I'd like at everything works as it should.

Thx

Best Answer

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.