Add custom application to “Applications” menu in elementary os

Elementary os Applications menu looks for installed applications in directory /usr/share/applications/ where files with extenstion *.desktop are located. Those files known as “desktop entries” are also used in KDE or GNOME desktop environments and detailed specification of their format is described at standards.freedesktop.org.

To keep things simple let’s say we downloaded latest version of Android Studio extracted tar file in desired location and we run application by studio.sh file by double clicking on it. When we open applications drawer in elementary os (or other desktop environment) we won’t be able to find it there. That’s because we don’t have desktop entry defined. So let’s do it!

Open terminal (Ctrl+Alt+T by default) and as system admin create empty android-studio.desktop file

cd /usr/share/applications/
sudo touch android-studio.desktop

Now we need to open file we just created in our favourite editor as admin and paste content like belowe into it.

[Desktop Entry]
Encoding=UTF-8
Name=Android Studio
Comment=Android IDE
Exec=/home/falvick/Android/android-studio/bin/studio.sh
Icon=/home/falvick/Android/android-studio/bin/idea.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

The most important line in this file is Exec where you need to put path to android studio executable. You can do this for any of your applications.

Note: I also found an article about App Launchers in elementary os documentation over here.

Advertisements

4 thoughts on “Add custom application to “Applications” menu in elementary os

  1. If you are not logged in as root, after creating programName.desktop you will have to do a
    chmod 777 programName.desktop
    (or be more restrictive) to be able to save it after editing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: