A .desktop file is a simple text file that holds information about a program. It follows a specific format and contains several key fields. The three categories of lines in a desktop entry file are [Desktop Entry], Key=Value pairs, and Comments . The Type and Name keys are required for every desktop entry file . The Exec key defines the command to execute when launching the application . The Icon key specifies the path to the icon file associated with the application . The .desktop file is usually placed in ~/.local/share/applications or /usr/share/applications/, depending on whether you want the launcher to be accessible for your local account only or for everyone .
chmod +x filename.desktop or right click it and add permission to execute./usr/share/applications or /home/"Username"/.local/share/applications[Desktop Entry]
Version=1.0
Name=jMemorize
Type=Application
Comment=Flash card based learning tool
Exec=/opt/jmemorise
Icon=/usr/share/icons/
Terminal=false
StartupNotify=true
Categories=EducationExec key. For example, if your executable is located at /home/user/programs/myprogram, you can set the Exec key to /home/user/programs/myprogramGenericName: This key provides a generic name for the application, which can be used by the desktop environment to display the application in menus and other places.Comment: This key provides a brief description or comment about the application.Categories: This key specifies the categories in which the application should be shown. The categories are separated by semicolons.MimeType: This key specifies the MIME types that the application is capable of handling.Keywords: This key specifies a list of keywords that can be used to search for the application. The keywords are separated by semicolons.StartupNotify: This key specifies whether the desktop environment should be notified when the application starts up.StartupWMClass: This key specifies the WM_CLASS property of the main window of the application, which can be used by the desktop environment to group windows together..desktop fileDesktop Entry Specification (specifications.freedesktop.org)
How to Create a .Desktop File for Your Application in Linux - Make Tech Easier