Join me on Facebook!
— Written by Triangles on July 27, 2016 • updated on November 13, 2017 • ID 41 —
Just create a simple text file and you're done.
Do you have the need to add a new application to my XFCE menu? Unfortunately, there are many confusing ways of doing it. In this article I want to tackle my favorite one: simple, easy, no-bullxxxt.
Suppose you want to add a new program, say CLion (which is a pleasant IDE, even if I can't stand such tools) to your XFCE menu. First of all, you have to prepare a simple
.desktop file that contains some information on the executable and the program itself.
Open your text editor and type something like the following:
[Desktop Entry] Version=1.0 Type=Application Name=<name-of-the-app> Exec=<path-to-executable-file> Icon=<path-to-icon-file> Categories=<list-of-;-separated-categories>
What to change in the above template:
There are several additional parameters you can add, but what you see above should be enough. The last step: put that file somewhere useful, so that the system can be aware of it and update the menu accordingly.
.desktopfile in the right place
You can place that file both in
/usr/share/applications or in
[your-home]/.local/share/applications. What's the difference? The former will enable the menu entry for every user, the latter only for you.