Today we are going to deal with a type of configuration file responsible for changing the way applications appear in your Linux distro's menu. Although we use GNOME as a reference, the tips really do fit virtually any interface.
.Desktop files are responsible for "iconifying" the programs you find in the menu, but more than that, they are responsible for categorizing the program in your distribution and for which keywords the application will be found when the user searches.
There are generally two locations where you find these files:
/ usr / share / applications
This file type has a lot of information and can be opened with any text editor.
Files inside your home will override the preferences contained in the "applications" folder in "/ usr / share" for your user. Thinking this way, if you want some change to be valid for all users of the system, change it directly at the root, if you want only for your user, you can change it only at home. This is the preferred case.
* To edit files within root and save changes, you need to run the text editor in root mode.
There are many types of parameters that can be applied here, such as:
Name: Change application name
Comment: Change application description
Exec: Where is the executable
Terminal: If the application can run through the terminal
Categories: Which menu category will it fall into
Keywords: Keywords that can be typed to find the app
Icon: Say the name of the cone that should be displayed
Among many others, an interesting parameter allows you to hide a menu and search icon if necessary "NoDiplay":
NoDisplay = true
NoDisplay = false
The first option hides the application, the second displays. The absence of the parameter automatically displays the application.
By configuring these files you can change the behavior of any application that appears on your system menu, check out the video above for several examples.
You can see the documentation for how the .desktop file should be written. on here. Leave us your comments, and participate in our forum Diolinux Plus. So you always stay on top of news and find a friendly place to take your questions.
See you next time!