Monday, July 22, 2013

How to get rid of Question Mark icons in Ubuntu Unity Launcher


This is an annoying problem we sometimes face with certain applications in Ubuntu. But the solution is very simple. For the convenience, let's go step by step. (I'm facing this problem for IntelliJ IDEA.) 

Step 1:

We have to create a Desktop Entry File (with .desktop extention) in ~/.local/share/applications. Desktop Entry File is a configuration file describing how a particular program is to be launched, how it appears in menus, etc. 

I'm creating jetbrains-idea.desktop file.

vi ~/.local/share/applications/jetbrains-idea.desktop 

Step 2:

Add following text to the file and save it.


[Desktop Entry]
Type=Application
Name=IntelliJ IDEA
Icon=/apps/idea-IC-129.354/bin/idea.png
Exec=/apps/idea-IC-129.354/bin/idea.sh


In this, the most important parts for our case are Icon and Exec parameters.  What happens here is like this. When you run the application which we mention in Exec parameter, the launcher uses the icon we mention in Icon parameter. 

Step 3:

That's all. Now, just restart the application. (IDEA in my case)

VOILA!!! 

Now you can see the icon in Unity Launcher. :)

If you want to learn more about Desktop Entry Files have a look at here [1]. 

A sample Desktop Entry File is here [2].



No comments:

Post a Comment