rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

Create new launcher items in Unity

Having custom application in the Unity menu can be very useful, specially if these applications are used every day. It will be very nice if nautilus allows us to drag and drop our favorite applications in the menu, no? Unfortunately, it is not the case. So here's two (2) methods on you can add your favorite applications in the Unit Menu.

Method #1:

Unity does support custom launchers from .desktop files. To create custom launcher from a .desktop file you need to create a *.desktop file for your program.

vi ~/.local/share/applications/name_of_your_app.desktop

The .desktop file should look something like this:

[Desktop Entry]
Name=the name you want shown
Comment=
Exec=command to run
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

Example:

[Desktop Entry]
Name=My Favorite App
Comment=
Exec=/path/to/my/app
Icon=/usr/share/icons/gnome/48x48/emotes/face-wink.png
Terminal=false
Type=Application
StartupNotify=true

Using your file manager, navigate to the home folder and navigate to cd ~/.local/share/applications (You may need to press ctrl+h to show) or in shell:

nautilus ~/.local/share/applications/

Method #2 (In 12.04)

Create an "Untitled Document" in your home folder (right click and select Create New Document).

Edit the file and add the following lines:

[Desktop Entry]
Type=Application

Save the file and rename it to what you want with the .desktop extension. For example: MyApp.desktop.

Now if you right-click on the document, you will see something like this: Create new launcher items in Unity

Now simply fill out the name, description, command and comment if you need. To change the application icon, click on the icon on the left of the name. This will pop a window, and you can choose the icon you want.

For a complete list of all applications, you can navigate or list all the files in the /usr/share/applications folder or in shell.

ls /usr/share/applications/*.desktop

This way you can customize items based on existing applications.