Linux - Ubuntu AppImage Desktop Application Menu Setup

Jun 8, 2025 | Reading Time: 3 min

What is an AppImage?

  • AppImage is a universal software packaging format for Linux.
  • It allows developers to distribute portable applications that run on most Linux distributions without installation or root permissions.
  • Each AppImage bundles the application and all its dependencies into a single executable file.
  • Benefits of AppImages:
    • No installation required: just download, make executable, and run.
    • No need for root access.
    • Easy to remove: just delete the file.

The Application Menu Issue

  • By default, AppImages are launched by double-clicking the file or running it from the terminal.
  • However, this isn’t as seamless as launching applications installed via your package manager, which appear in your desktop environment’s application menu (Dash, Activities, etc.).
  • Also, without the application menu integration, when you launch the AppImage a default icon (Setting Gear in Ubuntu) is shown and not the app icon.

How to integrate an AppImage in your Menu

  1. Download and place the appimage

    • You can create a dedicated folder in your home directory for placing all AppImages. E.g: mkdir -p ~/Applications
  2. Make the image executable: chmod +x ~/Applications/YourApp.AppImage

  3. Download an icon (optional)

    • For a seamless look, download an official icon for the app (a .png file).
    • Save it as ~/Applications/YourApp.png.
  4. Create a desktop entry file

    • Desktop entry files (.desktop) tell your desktop environment how to launch an application and what icon to use.

    • Create a new file as ~/Applications/YourApp.desktop

    • The specification can be found on the freedesktop site

    • Minimally you need:

      • Type=Application - Specifies this is an application launcher.
      • Name=Your App Name - The name shown in the menu.
      • Exec=/path/to/your/executable - The command to run your app.
      • Icon=/path/to/icon.png - For a visible icon (optional, but recommended).
      • Categories=Utility; - For proper menu placement.
      • Terminal=false - If your app does not need a terminal.
      • StartupWMClass=yourappclass - See below for details.
    • Example desktop file for DB Browser for SQLite

       1[Desktop Entry]
       2Name=DB Browser for SQLite
       3Comment=DB Browser for SQLite is a light GUI editor for SQLite databases
       4Exec=/home/YOUR_USERNAME/Applications/DB.Browser.for.SQLite-v3.13.1-x86.64-v2.AppImage --no-sandbox
       5Icon=/home/YOUR_USERNAME/Applications/sqlitebrowser.png
       6Terminal=false
       7X-MultipleArgs=false
       8Type=Application
       9Categories=Development;Utility;Database;
      10StartupWMClass=sqlitebrowser
      
  5. The StartupWMClass field

    • StartupWMClass is a key you can add to your .desktop file.
    • It helps your desktop environment associate a running application window with its launcher entry.
    • If you dont add this entry, you might see duplicate icons in your dock/taskbar when the app is running. Also, The running app might not be highlighted as launched.
    • If you are not aware of the class name you can detect the Correct StartupWMClass as:
      • Launch the AppImage (e.g., run it from terminal or double-click).
      • Open a terminal and run the following command: xprop | grep WM_CLASS
      • Click on the opened application window.
      • Read the terminal output, which will look like: WM_CLASS(STRING) = "sqlitebrowser", "DB Browser for SQLite"
      • You can add this to the desktop entry
  6. Copy the desktop file to local apps folder: cp ~/Applications/YourApp.desktop ~/.local/share/applications/YourApp.desktop

  7. Make it executable: chmod +x ~/.local/share/applications/YourApp.desktop

  8. Refresh system databases

    • Refresh the application desktop: update-desktop-database ~/.local/share/applications/
    • Refresh the icons cache: sudo update-icon-caches /usr/share/icons/*
  9. Launch from your application menu

    • Now, search for your application in your application menu (Launcher, Dash, Activities, etc.).
    • E.g By pressing the window key in Ubuntu.
    • You should see your new entry, complete with icon
    • Click to launch!