Add custom icon in Ubuntu launcher

Ubuntu uses Unity GUI (Graphical User Interface) and it has a great feature which is handy for running the application which you frequently use. While working with Linux, you may want to run your scripts (shell, Perl, Python, etc.) and you want to add your script to your launcher menu.

There are two ways to add your own icon in Ubuntu launcher (sidebar), you can write the icon script your self or you can use wizard. In the following post I have described how to add your custom icon (to run your custom script) to your application list and also your launcher menu.

1. Using wizard

In order to do this, you need to have gnome-panel installed on your Ubuntu, so if you have it already proceed to next command.

Installing gnome-panel:

sudo apt-get install gnome-panel

Running the wizard GUI:

gnome-desktop-item-edit ~/Desktop/ --create-new

So at this point the wizard have created you icon but not in the propper folder and you should move your icon to launcher folder:

mv ~/Desktop/YOUR-ICON-NAME.desktop ~/.local/share/applications/

The final step is simply finding the icon in the application list ad drag and drop it in the launcher.

 

2. Manually create the icon

To do this, you can simply copy and paste the following code in a text file and customize the parameters:

#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Terminal=true
Name=My Icon
Icon=/path/to//your/custom/icon.svg
Exec=/path/to/script/file.sh

In the last line (Exec) you can also write your shell command.

Then you should save the file with .desktop extension and in the following address:

~/.local/share/applications/

The final step is simply finding the icon in the application list ad drag and drop it in the launcher.

Leave a Reply

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

This is new type of CAPTCHA, make the puzzle please !WordPress CAPTCHA