Our site remains ad-free thanks to our affiliates. This post's featured affiliate is NordVPN. Online VPN service that encrypts your internet traffic and hides your IP with physical location. Upgrade your privacy and security now.
The post is not sponsored by the above affiliate and the content here is not representative of their company.
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" Terminal=false Type=Application Icon=wine-notepad Categories=Wine-Programs-Accessories;
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
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.
wine-programname.desktop file and set the Icon value to the
full path, no relative locations.