When I shifted to elementary os from Windows, One thing that felt bad for me is that sometimes the application we installed we cannot see the shortcut on the desktop or in the Applications menu. Here I will tell you how to add desktop shortcuts on Ubuntu or Debian based systems.
Adding a desktop shortcut is simple. All you need is to create .desktop
file at ~/.local/share/applications
or /usr/share/applications/
depending whether you want the shortcut to be accessible only by the local account or by everyone.
- Extract the zip file to any folder you want.
- Check for the image in the extracted folder.
- Create a
.desktop
file in/usr/share/applications/
sudo nano /usr/share/applications/[applicationname].desktop
4. copy the following into the .desktop
file and update it with the details you want.
[Desktop Entry]
Version=1.0
Name=Name of the application
Comment=text you want to show when hovering above the icon
Exec=Path of the executable file %U
Icon=Path of the image
Terminal=false
StartupWMClass=name of application
Type=Application
Categories=category of the application
MimeType=Type of application it should open
Version
is the version number of the program.
Comment
entry is the small dialogue box that appears when hovering over the icon.
Exec
is the path to the executable file of the application
Icon
is the path to the image of the application. If there is no image in the extracted folder you can download one and use it.
StartupWMClass
is added to prevent duplicate icons in the launcher.
For the full list of categories of desktop environments, check the official specification.
Below is the desktop entry of firefox developer edition. I have extracted it to /opt/firefox_dev
[Desktop Entry]
Name=Firefox Developer
GenericName=Firefox Developer Edition
Exec=/opt/firefox_dev/firefox %U
Terminal=false
Icon=/opt/firefox_dev/browser/chrome/icons/default/default128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition Web Browser.
StartupWMClass=Firefox Developer Edition
After you have copied it save the file and you are done. If the launcher is not added yet, please log out and then login.
Then the launcher will show up.