So let me start by saying i’m not in anyway an expert in ubuntu nor in linux or unix systems. I’m just a regular workstation user. Yes ubuntu is great as a work station as far as i am concerned. Though at times, you will need all your smarts if you really is into the minute details of the OS. For instance, there is this one bug I found out when i recently switch to ubuntu 12.10. Specifically when using Wine apps. Ok so when you install apps from wine it will be searchable in the “dash home” button, incase you don’t know which one is that, that’s the ubuntu logo on the top left of the launcher panel. Ok so if you click that, you can search there everything contained within your ubuntu installation. For instance, let’s use an app as an example, though i do not use it as filezilla is my choice, CuteFTP Pro. Ok so when you install cuteftp through wine you can search it in the dash home.
Now when you try to click that icon, the cuteftp window opens up no problem. It’s functional and runs perfect as it is rated platinum in wineHQs AppDB. There is only one problem though, if you have noticed the icon on the launcher associated on the window is not the CuteFTP icon but the wine icon and when you mouse over it, it reads “Wine Windows Program Loader”. So what’s the big deal? Imagine if you are using 2 wine App and both have same icon and same label it will be confusing to switch on which icon. Another thing is it is more convenient to switch to the app by recognizing the correct icon for that app. For instance if you want to switch to CuteFTP, you will just head to the launcher then click it’s icon. All these will be difficult to achieve when the launcher panel displays the wrong icon for your program.
I personally was bothered by it and decided that i can’t work through it, I just can’t. I myself use a couple of Windows native apps for editing codes myself as I kinda grew with it back in my windows days. Yes it has it’s linux counterparts but I am used with it so i really need Wine. So I googled and googled and allotted some time to find for a solution for a workaround, luckily after trying so many unconventional things and testing many user suggested solution and workaround, I found a workaround which works great and without you having to write or modify a bunch of cryptic codes.
Ok, since I know you are not here for the story(but of course!) but for the workaround, i’ve written it below. I’ll try to explain it as simple as well as in detail as possible.
- First is we need to edit to go to the .desktop file of your wine app. This is like the configuration file for the shortcut of your app or something of that nature. Open your file browser, i believe it’s called nautilus here in ubuntu. That’s the folder icon just below the dash home icon on your launcher top left. Go to Home/.local/share/applications/wine/Programs/ from there you can browse which app you are fixing, in our example it’s CuteFTP, so let’s go to “Home/.local/share/applications/wine/Programs/GlobalSCAPE/CuteFTP Professional”. There you will see the apps .desktop file, in our case “CuteFTP 8 Professional.desktop”. Drag that file to the launcher and you will see that it creates the correct icon.
That’s not the end of it, since if you will click it, it will open the application correctly but it will create a new icon in the launcher with the wine icon associated to it and not the Correct icon which you clicked in order to load it.
- So next is we need to know what is the name of the .exe file we are loading thru wine. We will need this data because we will add it in the .desktop configuration file later. So we head to the wine directory and find the .exe file or our application. In this example we head to “Home/.wine/drive_c/Program Files (x86)/GlobalSCAPE/CuteFTP 8 Professional/”. There we can see our .exe file is cuteftppro.exe
- Now we need to edit the .desktop file we used on step 1. To edit it just open a terminal, then type > sudo gedit ~/.local/share/applications/wine/Programs/GlobalSCAPE/CuteFTP\ Professional/CuteFTP\ 8\ Professional.desktop < Do not include the greater than and less than signs obviously.
You will notice that there are backslashes, it is needed to escape the whitespace charater, without that the terminal will interpret it as another parameter and that command will not work. So if the prompt asks for a password just type in your password then the text editor will popup containing texts of the .desktop file.
Now we need to add a little code in this file we need to add > StartupWMClass=cuteftppro.exe <. The cuteftppro.exe was the filename of our program’s executable file from step 2.
Now save this file, and we are done. Now try to click the application icon you dragged from step 1 and you will notice it will not create another icon with the wine icon on it, Instead the program is now associated with it. Now you can easily switch to that program by clicking the correct icon from the launcher.
Side note: Some applications do not have the correct icon. To change the icon in the launcher, just edit again the .desktop file then look for the “Icon=” code. In our examples case it is displayed correctly, “Icon=C099_cuteftppro.0”. The value for this paramter can be seen in the directory Home/.local/share/icons/hicolor/32×32/apps/ you can see all the icons we can use there, you can change the apps launcher icon if you want to. When you change the Icon= value do not include the file extension so in our example the icon file name is “C099_cuteftppro.0.png” so put only “C099_cuteftppro.0”
So that’s the end of this post, I hope this post helped you solve this little problem from ubuntu 12.10 Unity and Wine.