How to create a desktop icon in Linux – gnome and unity desktops

Reading Time: < 1 minutes

Gnome and Unity desktops use .desktop file for application icons. The file looks something like this:

[Desktop Entry]
 Name=Sublime Text Editor
 Comment=Sublime Text Editor
 Exec="/opt/Sublime Text 2/sublime_text" %F
 Icon=/opt/Sublime Text 2/sublime_text.png

Sometime, when you download a binary executable, it does not create an application icon. To add it to applications list, follow the below steps:

Create a file like with .desktop extension, name it according to how you want it to appear in applications list. Replace the path to executable & icon file in above sample. And you are almost done.

Lastly, put this file to an appropriate folder, like:

~/.local/share/applications, /usr/local/share/applications or /usr/share/applications

Leave a Reply