Art, Programming, Linux

Andrew's notes

Home Posts Tags

How to Create Custom Application Menu Shortcuts in Linux

Follow this guide to create your own application menu shortcuts

Published on March 8, 2023 352 words 2 min read Linux

Image by Stefan Steinbauer

Application menu shortcuts in Linux provide an easy way to quickly access your favorite applications. Instead of having to navigate to the application through the file manager or terminal, you can simply click on the shortcut in the application menu. This can save a lot of time and make your workflow more efficient. Creating a custom application menu shortcut is also a great way to make your favorite applications more easily accessible. In this guide, we will walk you through the steps to create a new application menu shortcut in Linux.

To create a new shortcut in Linux, you need to create an .desktop file and place it inside the /usr/share/applications/ directory. The .desktop file is essentially a configuration file that contains information about the application, such as its name, icon, and command used to launch it.

Here is an example of a .desktop file i made for personal use, for the digital painting program Krita:

[Desktop Entry]
Name=Krita
GenericName=Digital Painting and Image Processing
Comment=Go ahead and paint!
Exec=/opt/Krita/krita-5.1.5.appimage
Terminal=false
Type=Application
Icon=krita

In the example above, the Name field refers to the name of the application as it will appear in the menu, the Exec field specifies the command used to launch the application which in my case is simply the path to the executable, and the Icon field refers to the icon file used for the application.

Once you have created the .desktop file and placed it inside the correct directory, you should be able to see the new shortcut in your application menu. If the shortcut does not appear right away, you may need to log out and log back in to see the changes.

If you would like to learn more about what you can do with application shortcuts in linux and what other parameters you may set, go ahead and open up the .desktop file of your favorite applications and take a look inside. In this example we used a very simple and minimal .desktop file but for a real world shortcut you will need to set a lot of parameters for things like different languages et cetera.

---

If you found this post useful please consider donating a small amount to support my effort in creating more content like this.