Add Wine Programs to Menu in Linux

GeekThis remains completely ad-free with zero trackers for your convenience and privacy. If you would like to support the site, please consider giving a small contribution at Buy Me a Coffee.

While messing around in Wine inside of Linux Mint, I noticed that a good amount of programs I installed just wouldn’t appear inside of the Application Menu under “Wine”. This was a huge nuisance. I had to manually keep finding the program’s location to execute it (or make a desktop shortcut, but I like having my desktop clean). But I now have a solution I put together today, and it needs to be shared.

Creating the File

As the header says, we have to create a single file to add our application to the menu under the Wine category. If you don’t have a wine category, you can change the category in the below file. The following will be done using the terminal.

$  cd /usr/share/applications
$  sudo touch wine-programname.desktop
$  sudo nano wine-programname.desktop

In the above commands, you will want to change program name to your programs name (no spaces). I prefix wine programs, but you don’t have to include the wine- in the file name if you don’t want to.

We have to edit this file now. I have it currently opened in nano, but you can open it in any program you want as long as you have it opened using the correct permissions.

[Desktop Entry]
Name=The Programs Name
Comment=Information About The Program
Exec=wine "c:\full\path\to\the\program.exe"

You will want to change the Name, Comment and Exec lines. The exec line is the path in relation to your wine installation. So you will reference the file location as C:\ instead of your linux root directory. Windows isn’t case sensitive so you don’t have to worry about case in the exec line.

Now when you save this file (ctrl + o in nano), and then open up your Applications Menu, you should see your program. It will be using the notepad icon, but this can be change also.

Changing the Icon Method 1

The first thing to do is create your icon. Use your favorite editor or find the icons online. The images can be in PNG format (which I prefer). After you have the icons for the sizes of 16x16, 22x22, 24x24, 32x32, 48x48 you should be all set for the following commands.

$ cd /usr/share/icons
$ find ./ -name "wine-notepad*"

This should give you a list of where the wine-notepad icon is stored that you are seeing. You will want to place your new icon’s into where these icons are stored (don’t overwrite them, use your own icon name).

$ mv new-icon-16.png /usr/share/icons/Mint-X/apps/16/wine-programname.png
# repeat this for all the locations and set your icon to the proper one to copy

$ cd /usr/share/icons
$ sudo find ./ -name "wine-programname*" | sudo xargs chmod 644

After you move all of the files, we change directories to the icon folder and change the image permissions to 644, so the system can read the icons no matter what user.

Open up your wine-programname.desktop file again and edit the Icon value to your new icon, such as wine-programname (don’t include the file extension).

Now log out and back in again to see your icon. You may need to restart if logging out doesn’t make the icon appear.

Changing Icon Method 2

Instead of setting up the icon for global use, you can simpily save your icon to a public location such as the root of /usr/share/icons. Make sure every user has read access by chmodding to 644 or greater.

Open your wine-programname.desktop file and set the Icon value to the full path, no relative locations.

Related Posts

Using Olimex with AVRDUDE in Linux

This post covers how to get the olimex avr-isp-mk2 programmer to run with AVRDUDE and Linux, along with how to modify Udev permissions.

Backup Evolution using the Terminal

Learn how to backup all of your Evolution data through the terminal by using a simple command. There is no longer a need to open Evolution to perform backups.

Todoist App for Linux

Learn how to add a Todoist app to your Linux computer by using the Chrome App.

LUbuntu Keyboard Shortcuts (Openbox)

Learn how to edit keyboard shortcuts inside of Openbox and LUbuntu.