Install app to .desktop file

  • to appear in the menu

Create a .desktop file in the directory ~/.local/share/applications. Beware: .local is a hidden directory in your home folder. You only can see it if you turn on “Show hidden files” in your file manager. Open that file in a text editor. For this example, we will call it betterbird.desktop.

Add the first line:

[Desktop Entry]

Decide the name you want to see for the program in the menu. For example: betterbird. Announce that in the .desktop file with a Name=… line. The betterbird.desktop line now looks like:

[Desktop Entry]
Name=betterbird

Determine which executable you need to run to start the program. Announce the executable in an Exec=… line.

[Desktop Entry]
Name=betterbird
Exec=myapplication

(full path to executable may be needed – try in command line first)

Also specify this is a launcher for a program:

[Desktop Entry]
Name=betterbird
Exec= /home/andy/apps/betterbird/application.ini
Type=Application

To install a custom icon, copy the graphic you want to use, in.png or .svg format, to ~/.local/share/icons. Then announce it in your .desktop launcher. In this example, we assume the file name is myapplication.png

[Desktop Entry]
Name=My Application
Exec=myapplication
Type=Application
Icon=betterbird

If the icon resides in one of the standard locations searched for icons, only specifying file name without extension is sufficient. If your icon file lives elsewhere, you can/need to specify the full path.

Again, in most desktop environments, your user menu will be updated automatically within seconds. Else, log out then back in.