Add binary to Applications Menu
Is it possible to add a binary to the applications menu in Ubuntu 20.04.2? I have tried the following .desktop
file for Filezilla which I extracted from FileZilla_3.55.1_x86_64-linux-gnu.tar.bz2
:
Path=/home/user/Programs/FileZilla_3.55.1_x86_64-linux-gnu/FileZilla3/bin/
Exec=filezilla
Name=AppImageLauncher
Type=Application
Terminal=false
Icon=/home/user/Programs/FileZilla_3.55.1_x86_64-linux-gnu/FileZilla3/share/icons/hicolor/48x48/apps/filezilla.png
I have used this approach for AppImages for which it works. Is there a way to do same for a binary?
▶ You can add any executable to the applications menu, be it a binary or any script, as long as it is executable.
On the Exec=
line, you need to specify a valid executable:
- If the executable resides in your search PATH (use
echo $PATH
to see all directories that are searched for executables), then you can simply specify the name of the executable file. - If it resides elsewhere, you need to provide the full pathname to the executable, e.g.
/home/user/Programs/FileZilla_3.55.1_x86_64-linux-gnu/FileZilla3/bin/filezilla
.
▶ In order to see your application in the application menu, it must reside in one of the dedicated folder (use echo $XDG_DATA_DIRS
to see them - add to each path /applications
to obtain the actual folder). For your custom application, place it in .local/share/applications
if you are the only user that needs to use the applications. Otherwise, put it in /usr/local/share/applications
. You may need to create these folders if they are not present on your system.