In this article, you will learn how to create, configure, and modify desktop entries on Linux.
A desktop entry in Linux is a very integral part and we all use these desktop entries literally every single day but hardly think about them. Especially, guys who are beginning to use Linux. These beginners most of the time have no idea about a Linux desktop entry and how to create or modify it.
What is a desktop entry in Linux anyway!
A desktop entry in Linux is a simple text file starting with the application name having .desktop extension. These files are stored at two locations:
- /usr/share/applications → (System level)
- ~/.local/share/applications/ → (User level)
A typical such file contains the meta-information about a particular application. Here is the desktop entry for the skypeforlinux application.
So the icons that you see on your system are actually desktop entries.
Why should you care about the desktop entries?
There are times when you install an application that doesn’t come with a desktop entry and you have to manually execute the application from the terminal to start it every single time.
A small list of the applications that doesn’t come with the desktop entry:
- Tor Browser
To resolve this issue, you can simply create a desktop entry for that particular application and it will start to show up in the applications menu.
How to create desktop entries on Linux
To create a desktop entry on a Linux distribution we can use two different ways.
- Manually creating the desktop entry.
- By using tools like Menulibre or Mozo.
The first one is pretty straight forward, simply duplicate a pre-existing desktop entry and modify the metadata.
However, in this world of graphical user-interfaces, you can use some tools to do just that with minimal effort.
For the demonstration, I am gonna use Menulibre, a desktop entry manager.
Installing Menulibre on Linux
Menu libre is a very popular tool, you can easily install it using your software center or by simply executing the installation command for your Linux distribution.
For Ubuntu, Debian, and their derivatives
sudo apt-get install menulibre
For RPM based dribtributions like Fedora, CentOS, REHL
sudo dnf install menulibre (epel repository)
And for Arch and its derivatives
sudo pacman -S menulibre
After the installation, search for Menu Editor in the applications menu and open the application.
Now you just have to create a new entry and fill in the needed information so that the desktop entry can work properly.
After filling in all the meta-data about the application, hit the save button in the application and search for it in the application menu.
Learn more about apt: Complete apt package manager guide for Linux
Watch Video guide on YouTube
Additionally, You can also watch a step-by-step video guide on YouTube to get a better understanding of it.
Finally, we have arrived at the top. Hope you learned something interesting. Let me know what you think about it in the comments and subscribe to the LinuxH2O Youtube channel. Till then, keep enjoying Linux.