All Linux distribution users are familiar with "AppImages": they are portable and do not require any prior installation. This is very convenient, but as it stands, the application does not appear in any of the computer's menus and is not necessarily detected by launchers.
This is where .desktop files come in. A .desktop file is simply a text file that tells the computer that an application exists and creates a new entry in the menu.
The basic
A basic .desktop file contains several informations about the application it describes :
-
[Desktop Entry]: Mandatory header, that indicates a menu entry -
Type: "Application", "Link", or "Directory" (but here we want "Application") -
Name: The name that will appear in the menu -
Comment: The tooltip that shows when hovering over the icon. -
Icon: The path to the icon of the app -
Exec: The command to run to launch the app -
Terminal: To know whether it should run from a terminal or not -
Categories: To categorize the app (e.g., "Development", "Game", "Network")
This would look like this :
[Desktop Entry]
Type=Application
Name=MySuperApp
Comment=Super is my app
Icon=/home/YOUR_USER/Applications/my-super-app.png
Exec=/home/YOUR_USER/Applications/MySuperApp.AppImage
Terminal=false
Categories=Utility;
⚠️
ExecandIcondon't understand relative paths. You need to use absolute paths for those fields.
Make it executable
To have a functional menu entry, the AppImage needs to be executable, meaning it has the permission to be executed. To do so, the following command can be used :
chmod +x /home/YOUR_USER/Applications/MySuperApp.AppImage
Put it in the relevant folder
For your desktop to know where to find your menu entry, you can your freshly created file in ~/.local/share/applications/. The menu entry will be available for the user possessing the .desktop file.
It can also be placed in
/usr/share/applications/, if all the user of the desktop should have the menu entry.
That's it
You should now see your app with its icon. You can now search for it, pin it to your dock, or launch it just like any other installed application.
Top comments (1)
Nice, this is super clear and straight to the point. Love how you walked through a minimal
.desktopexample and mentioned the absolute path and permissions gotchas—those trip people up a lot. Really handy guide for keeping AppImages feeling like “real” apps in the desktop menu.