Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: shortcut for wine programs

  1. #11
    Join Date
    Jun 2007
    Beans
    17,337

    Re: shortcut for wine programs

    Possibly notepad isn't the best example, though I don't use Lubuntu so maybe things are different

    Typically wine installs a wine wrapper script in /usr/bin for notepad so it can be started like any other binary, in this case just
    notepad
    So a simple desktop launcher would be
    Code:
    #!/usr/bin/env xdg-open
    
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon=wine-notepad
    Name=notepad
    Exec=notepad
    StartupNotify=true
    Noting that the launcher (.desktop) must be set to execute in permissions

    For 'normal' installed .exes you can create launchers with several different Exec= lines, 2 examples here with same .exe
    The only difference would be seen on something like Unity where the 2nd one produces the correct icon in the launcher, not a factor here.
    Code:
    [Desktop Entry]
    Name=DVD Decrypter
    Exec=wine "C:\Program Files\DVD Decrypter\DVDDecrypter.exe"
    Type=Application
    StartupNotify=true
    Path=/home/doug/.wine/dosdevices/c:/Program Files/DVD Decrypter
    Icon=/home/doug/.local/share/icons/48e9_dvddecrypter.0.png
    or
    Code:
    [Desktop Entry]
    Name=DVD Decrypter
    Exec=env WINEPREFIX="/home/doug/.wine" wine C:\\\\Program\\ Files\\\\DVD\\ Decrypter\\\\DVDDecrypter.exe
    Type=Application
    StartupNotify=true
    Path=/home/doug/.wine/dosdevices/c:/Program Files/DVD Decrypter
    Icon=/home/doug/.local/share/icons/48e9_dvddecrypter.0.png
    To put some perspective I included the linux path in a Path= line, can be in the .desktop

    As far as notepad - you could test if the wrapper script is working by simply using notepad in a terminal or run dialog (Alt+f2 here

  2. #12
    Join Date
    Jan 2010
    Beans
    37

    Re: shortcut for wine programs

    Thank you Pc4Man, this is a very thorough guide but the shortcut still wont react. So I tried to run the "exec" lines (both of them, many times) in terminal, but it returned an error message:
    wine: Bad EXE format for C:\Program Files\MyFolder\MyFile.exe
    Ok, so I experimented a bit: installed a windows program, and pasted the exec line here. Well, it was frightening:
    Exec=env WINEPREFIX="/home/myusername/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/myusername/.wine/dosdevices/c:/users/Public/Start\\ Menu/Programs/MyFile/MyFile.lnk

  3. #13
    Join Date
    Dec 2009
    Beans
    6,777

    Re: shortcut for wine programs

    So this does not work?
    Code:
    Exec=env WINEPREFIX="/home/myusername/.wine" wine "C:\Program Files\notepad.exe"
    Change "C:\Program Files\notepad.exe" to whatever the correct path is to the exe.

  4. #14
    Join Date
    Jan 2010
    Beans
    37

    Re: shortcut for wine programs

    It didn't work, but this time it gave an error message at least:
    Failed to change to directory '/home/myusername/.wine/dosdevices/c:/Program Files/MyProgram/MyProgram.exe' (Not a directory)
    No idea what it means... the path is all right, that is for sure.

  5. #15
    Join Date
    Jun 2007
    Beans
    17,337

    Re: shortcut for wine programs

    Then just use the method shown at the bottom of post 8, as in
    Exec=wine 'exact path to exe'
    So to get that AND test that the .exe works, open your file browser and navigate to the .exe
    Then open a terminal, type in wine, hit the spacebar and then drag & drop your .exe into the terminal
    That's your exact path, you can copy it out into your launcher (.desktop

    To test the .exe then just press enter in terminal. If it runs the it will also run from the launcher

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •