DEV Community

Cover image for How to Create a Gnome Desktop Entry

How to Create a Gnome Desktop Entry

thegamefreak720 profile image Ori Alvarez Originally published at ・2 min read

I'm an avid user of Linux and my favorite distro is Fedora that comes with the gnome desktop. I find their search bar one of the most powerful things in my workflow allowing me to find programs with ease. Sometimes when I download programs that are executables they don't have a desktop entry disallowing me to use this feature. I could run them on my terminal but if I close the terminal it closes the program. Adding a desktop entry on these few cases is a quick solution that just requires a little bit of elbow grease. We can always automate the process in the future.

What is a desktop entry?

On your desktop, each program that you find when clicking the super key is a desktop entry. Every new program that doesn't do this for you needs to be registered. How new desktop entries are registered is by having a .desktop extension after the name of the application.

Where is the desktop entries located?

The entries are located in /usr/share/applications directory.

What do I need to do to create one?

You will need to create a file with a unique name that doesn't have spaces or international characters e.g. minecraft.desktop. You can copy-paste this template to get started:

[Desktop Entry]
Name=FooCorp Painter Pro

Following that template if for example, you have your executable on the home directory for your user you can do something like this:

[Desktop Entry]

You can find more information on Gnome Official Documentation

Happy Hacking! 🚀

Discussion (2)

vonheikemen profile image

Thank you very much for this. I just created a desktop entry for neovim's appimage and now LXDE (my desktop environment) knows it exists.

thegamefreak720 profile image
Forem Open with the Forem app