Software & AppsOperating SystemLinux

Creating Windows Application Shortcuts with Wine

Ubuntu 15

Running Windows applications on Linux systems has been made possible with the help of Wine. Wine is a compatibility layer that allows users to run Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, and BSD. However, starting a Windows application through Wine often requires launching the terminal and typing a command. To simplify this process, we can create desktop shortcuts for Windows applications installed with Wine. This article will guide you through the process of creating these shortcuts.

Quick Answer

Yes, it is possible to create Windows application shortcuts with Wine on Linux systems. This can be done either through the desktop context menu or manually through the terminal. Shortcuts make it easier to access Windows applications installed with Wine without having to type commands in the terminal each time.

Prerequisites

Before we start, ensure that you have the following:

  • A Linux system with a graphical desktop environment.
  • Wine installed on your system.
  • A Windows application installed with Wine.

Creating a Shortcut using the Desktop Context Menu

In some Linux distributions, you can create a shortcut directly from the desktop context menu.

  1. Right-click on your desktop and select “Create Launcher” or “Create New Launcher”.
  2. Fill in the necessary details.
    • Name: Enter the desired name for your shortcut.
    • Command: Enter the path to your Windows application executable file using Wine. For example, if you have Notepad++ installed at “/media/DATA/Progs/Notepad++/notepad++.exe”, you would enter:
      wine /media/DATA/Progs/Notepad++/notepad++.exe
      The wine command is used to start Wine, and the path following it is the location of the executable file of the Windows application.
  3. Choose an icon for your shortcut (optional). You can click on the icon button and select an icon file.
  4. Click “OK” or “Create” to create the shortcut on your desktop.

Creating a Shortcut Manually

If the “Create Launcher” option is not available in your context menu, you can manually create the shortcut.

Step 1: Create a Storage Folder for the Launcher Script

Open a terminal session and create a storage folder for the launcher script by running the following command:

mkdir $HOME/.bin

The mkdir command is used to create a directory, and $HOME/.bin is the location of the directory.

Step 2: Create the Launcher Script

Create the launcher script by running the following command:

nano $HOME/.bin/appname.sh

Replace “appname” with the desired name for your shortcut. The nano command is used to start the nano text editor, and $HOME/.bin/appname.sh is the location and name of the script file.

In the script file, enter the following code:

#!/bin/bash

wine /path/to/your/application.exe

Replace “/path/to/your/application.exe” with the actual path to your Windows application executable file. The #!/bin/bash line indicates that the script should be run in the bash shell, and the wine /path/to/your/application.exe line is the command to start your Windows application with Wine.

Save the file by pressing “Ctrl” + “X”, then “Y”, and finally “Enter”.

Step 3: Make the Script Executable

Make the script executable by running the following command:

chmod +x $HOME/.bin/appname.sh

The chmod command is used to change the permissions of a file, and +x adds the execute permission to the file.

Step 4: Create the Desktop Link

Create the desktop link by running the following command:

nano $HOME/Desktop/appname.desktop

Replace “appname” with the same name used in the previous steps.

In the desktop link file, enter the following code:

[Desktop Entry]
Name=Appname
Comment=Wine Program
Exec=$HOME/.bin/appname.sh
Icon=/path/to/icon/file
Terminal=false
Type=Application
Categories=Game;
GenericName=Appname

Replace “Appname” with the desired name for your shortcut and “/path/to/icon/file” with the path to your desired icon file (if available). The Exec line specifies the command to be run when the shortcut is clicked, and the Icon line specifies the icon to be used for the shortcut.

Save the file by pressing “Ctrl” + “X”, then “Y”, and finally “Enter”.

Now you should have a shortcut on your desktop to start your Windows application with Wine. You can repeat these steps to create shortcuts for other Windows applications as well. This will make accessing your Windows applications through Wine much more convenient.

Conclusion

In this article, we have learned how to create desktop shortcuts for Windows applications installed with Wine. This process can be done either directly from the desktop context menu or manually through the terminal. Regardless of the method used, these shortcuts will allow you to easily access your Windows applications without having to manually start Wine through the terminal each time. Happy computing!

Can I create shortcuts for any Windows application installed with Wine?

Yes, you can create shortcuts for any Windows application installed with Wine as long as you know the path to the executable file of the application.

Can I change the name of the shortcut after creating it?

Yes, you can change the name of the shortcut by right-clicking on it, selecting "Rename," and entering the desired name.

Can I change the icon of the shortcut?

Yes, you can change the icon of the shortcut by right-clicking on it, selecting "Properties," going to the "Basic" tab, and clicking on the icon button to choose a different icon file.

Can I create shortcuts for multiple Windows applications?

Yes, you can create shortcuts for multiple Windows applications by following the same process for each application.

Can I delete the shortcut without affecting the Windows application installed with Wine?

Yes, deleting the shortcut will only remove the shortcut itself and will not affect the Windows application installed with Wine. The application will still be accessible through other means, such as the terminal or the application menu.

Leave a Comment

Your email address will not be published. Required fields are marked *