Autorun .EXE files with WINE

144

Solution 1

I installed wine so I can answer this question better. Once wine finished installing (from Software Center)

enter image description here

I copied an EXE file over (utorrent.exe)

enter image description here

The I right clicked the file, and choose Open With --> Wine Windows Program Loader, and it opened. See image below.

enter image description here

enter image description here

Solution 2

To autorun .EXE files with WINE when you double click on them from your file manager you need to edit ~/.local/share/applications/mimeapps.list file (or /usr/share/applications/defaults.list to make this change system-wide) and add the following line at the end of the file:

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

A system reboot is probably necessary.

Share:
144
Matias Masso
Author by

Matias Masso

Updated on September 18, 2022

Comments

  • Matias Masso
    Matias Masso over 1 year

    I can read the filename using next code when dragging a file from an Ftp folder browsed on Windows explorer. But is there a way to retrieve the full Ftp path?

        Private Sub DataGridView1_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragDrop
        Dim filename As String = ""
        If e.Data.GetDataPresent("UniformResourceLocator") Then
            Dim ioStream As System.IO.Stream = DirectCast(e.Data.GetData("FileGroupDescriptor"), System.IO.Stream)
            Dim contents As Byte() = New [Byte](511) {}
            ioStream.Read(contents, 0, 512)
            ioStream.Close()
            Dim sb As New System.Text.StringBuilder()
            Dim i As Integer = 76
            While contents(i) <> 0
                sb.Append(CChar(ChrW(contents(i))))
                i += 1
            End While
    
            filename = sb.ToString()
        End If
    
    End Sub
    
    • Alvar
      Alvar almost 11 years
      What you need is a launch script....
  • travisw
    travisw almost 11 years
    Wine is not in the list of available applications to Open With. The option to add a program is greyed out.
  • SimplySimon
    SimplySimon almost 11 years
    Try starting the file browser from terminal with sudo nautilus navigate to the file and try setting the default again. I too do not have wine installed.
  • Mitch
    Mitch almost 11 years
    I'll install wine and let you know a little later.
  • travisw
    travisw almost 11 years
    'sudo nautilus' doesn't seem to do it, but placing the .exe on desktop allows it to work, so problem solved! Thanks. :)