20

While attempting to create a desktop shortcut for an app that uses wine I came up with this error:

Failed to execute child process "/home/fiver/.wine/drive_c/Program" (No such file or directory)

I have followed all the instrutions at jaypeeonline.net

1

7 Answers 7

24

You can create by hand a desktop shortcut for your applications installed with wine by following these steps:

  1. Open your favourite text editor (gedit, nano, etc.), create a new file with the following content and save it to your Desktop with a name having extension .desktop

    In this example, I've chosen to the name inetexplorer.desktop and saved it to my desktop.

    [Desktop Entry]
    Name=Internet Explorer
    Exec=wine "C:\Program Files\Internet Explorer\iexplore.exe"
    Icon=/path/to/iconfile
    Type=Application
    Categories=Wine;
    

    Here, replace the value for Name field with that of the target application's name. (In the example, it's Internet Exolorer.) The value of Exec would be in the format:

    wine "C:\path to the\executable file"
    

    (for CLI application) like say

    wineconsole "C:\path to the\executable file"
    

    (for GUI applications)

    wine "C:\Program Files\Internet Explorer\iexplore.exe"
    

    (enclosing the path within double quotes ".. .." is important if the path contain blank spaces.)

    Replace /path/to/iconfile (the value for Icon field) with the path of an icon file (like Icon=/home/username/Pictures/internet-explorer.png) or you can omit this line of entry.

    On the left is a shortcut with icon specified, for the one on right, not. iconField

  2. Turn on the file's execute bit on.

    Graphically you can do it by right clicking the .desktop file, and from the context menu select Properties. In the properties window, select Permission tab, look for a label Execute: and check-mark the check-box next to it so that the shortcut becomes executable.

    selecting property from right-click context menu rightClickTheFile

    setting execute permission executableProperty

    From terminal, you can do this with:

    chmod +x $USER/Desktop/inetexplorer.desktop
    

    where $USER/Desktop/inetexplorer.desktop should be the absolute path of the desktop shortcut that was created.

2
6

I've created a script that adds a shortcut to GNOME applications menu just by typing ./wine-create-shortcut paht/to/application.exe.

You can find further information here.

2
  • This script does the job! And app can be added to favorites! Very good! Oct 21, 2021 at 10:12
  • This script is a gem! Worked for me when everything else did not! Thank you!
    – Siniša
    Jan 14, 2022 at 7:29
5

I suggest you to use PlayOnLinux, in combination with wine, which offers a clean and user-friendly interface, that let you install and manage windows software and games.

enter image description here

PlayOnLinux is a piece of software which allows you to easily install and use numerous games and apps designed to run with Microsoft® Windows®. Few games are compatible with GNU/Linux at the moment and it certainly is a factor preventing the migration to this system. PlayOnLinux brings a cost-free, accessible and efficient solution to this problem.

Here is a non-exhaustive list of the interesting points to know:

  • You don't have to own a Windows® license to use PlayOnLinux.
  • PlayOnLinux is based on Wine, and so profits from all its features yet it keeps the user from having to deal with its complexity.
  • PlayOnLinux is free software.
  • PlayOnLinux uses Bash and Python.

Nevertheless, PlayOnLinux has some bugs, as every piece of software:

  • Occasional performance decrease (image may be less fluid and graphics less detailed).
  • Not all games are supported. Nevertheless, you can use our manual installation module.

Installation:

  1. Simply use Software-Center to install it,
  2. or refer to their HP installation info.

Here is another solution, that uses your Ubuntu OS based system standards.

enter image description here

  1. Open Main Menu Application and select New Item button,
  2. which will open a Create Launcher window, from where you can use the Browse button, that let you select the path to the .exe (executable) windows application/game.

    • You can also name the new shortcut, add a description and icon to it from there.
1
  • PlayOnLinux works often better than Wine alone, but isn't it very space-consuming, as it runs isolated, virtual disk for each program (not 2 or more in the same disk)?
    – Quidam
    Apr 24, 2020 at 22:15
4

You have to escape the white spaces using backslashes (\). Try to specify the command like this:

".../Program\ Files/Adobe/Adobe\ Photoshop\ CS2/..."

Note the \ before spaces.

1
  • 3
    Or, you can use quotation, which is pretty much more readable. wine '/home/user/.wine/drive_c/Program Files/Some Program with many spaces/program.exe'
    – mid_kid
    Mar 22, 2014 at 13:57
1

Because I cannot comment, I have to give here a separate answer. ;-) A big thanks goes to user "precise". The solution mentioned by him or her worked for me at Kubuntu 18.04 and Wine 5.0 but I had to add at the path name two backslashes (and not just one).

Based at the above mentioned example this will look like:

Exec=wine "C:\\Program Files\\Internet Explorer\\iexplore.exe"

I have no idea why this is so, maybe because my Program Path is somewhat more complex:

Exec=wine "C:\\Program Files\\Steuer St.Gallen 2019 nP\\Steuer St.Gallen 2019 nP.exe"

A little update to this topic. Finally I was able to add the correct icon to the shortcut. (It was available in a hidden folder at the corresponding program location.) The extraction of the icon from the executable also worked but I was not able to use the separate *.ico file as icon source.

However, - here follows the full content of my manually generated and perfectly working Wine shortcut.

[Desktop Entry]
Name=Steuer St.Gallen 2019 nP
Exec=env WINEPREFIX="/home/franz/.wine" wine "C:\\Program Files\\Steuer St.Gallen 2019 nP\\Steuer St.Gallen 2019 nP.exe"
Type=Application
StartupNotify=true
Icon=/home/franz/.wine/dosdevices/c:/Program Files/Steuer St.Gallen 2019 nP/.install4j/i4j_extf_9_1bhpfkc_1iu21cz.png
Path=/home/franz/.wine/dosdevices/c:/Program Files/Steuer St.Gallen 2019 nP
StartupWMClass=Steuer St.Gallen 2019 nP.exe

This corresponds mostly to the automatic established Microsoft PowerPoint Viewer shortcut:

[Desktop Entry]
Name=Microsoft PowerPoint Viewer 
Exec=env WINEPREFIX="/home/franz/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/franz/.wine/dosdevices/c:/users/franz/Start\\ Menu/Programs/Microsoft\\ PowerPoint\\ Viewer\\ .lnk
Type=Application
StartupNotify=true
Comment=Mit Microsoft PowerPoint erstellte Präsentationen anzeigen.
Icon=976E_ppvwicon.0
StartupWMClass=pptview.exe

There were added automatically several other parameters (with mostly no value) after making the file executable. Because these have no function, I have removed them again manually.

Comment[de_DE]=
Comment=
GenericName[de_DE]=
GenericName=
MimeType=
Terminal=false
TerminalOptions=
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
1
0

here is what i did on Linux Mint 20.3 XFCE: I followed the steps made by precise but with some additions, in my case i have installed TES:Oblivion and added some mods, one of them function as a separate launcher, so i used some of the original desktop shortcut settings in the new one.

Original:

    [Desktop Entry]
    Name=The Elder Scrolls IV - Oblivion
    Exec=env WINEPREFIX="/home/emmanuel/.wine" wine-stable C:\\\\windows\\\\command\\\\start.exe /Unix /home/emmanuel/.wine/dosdevices/c:/users/Public/Escritorio/The\\ Elder\\ Scrolls\\ IV\\ -\\ Oblivion.lnk
    Type=Application
    StartupNotify=true
    Path=/home/emmanuel/.wine/dosdevices/d:/Oblivion
    Icon=26C1_goggame-1458058109.0
    StartupWMClass=oblivionlauncher.exe

And here the version i did:

    [Desktop Entry]
    Name=The Elder Scrolls IV - Oblivion OBSE
    Exec=wine "D:\Oblivion\obse_loader.exe"
    Path=/home/emmanuel/.wine/dosdevices/d:/Oblivion
    Icon=26C1_goggame-1458058109.0
    Type=Application
    Categories=Wine;

Take note the Icon line, this is the real icon name: goggame-1458058109.ico ; you can see a difference there, i don't know why it is writen like that in the original shortcut, but it works. The Path line i think it is needed to use that icon file.

This may help you also if you need a NO_CD or patched launcher/executable for running old games.

0
-1

I know the best and easiest way !

Open /home/.local/share/wine/programs And you can see your wine apps folders open your app folder , there is your_app_name.desktop , copy it to desktop and right click on it , and then , left click on Allow Launching

Congratulations !!! Your app shortcut is on your desktop , enjoy !

Sorry if my English is not good

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .