The cool thing about Ubuntu is that you can pretty much create your own Desktop icon for just about any executable. It can be a bash script, a c++ machine code executable, a python script or a .jar file.
Before we step through the intricacies of this, the following is the only pre-requisite needed:
- An Ubuntu computer (or VM)
Step 1:
Start by creating a file with a .desktop extension. Do not worry about where this file is created for now. We will eventually shift the file to the right location.
touch new_app.desktop
Step 2:
Add the following into the file:
Version: This indicates which version of the Desktop Entry Specification is being used. Typically “1.0” is used as per: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html. Do take note that this field can be omitted
Type: There are 3 types, Application
(type 1), Link
(type 2) and Directory
(type 3). In our case we will be using Application
.
Terminal: This indicates whether a terminal window should be opened. In our case this is not needed.
Exec: This is the path to the executable.
Name: This is the name of the application.
Icon: This is the path to the icon that will be used as the desktop application.
Step 3:
Place the above file in .local/share/applicatons
.