A Python CLI tool that automatically generates .desktop files for AppImages and integrates them into your Linux desktop environment's application launcher.
- π Automatic Integration: Generates
.desktopfiles and places them where your desktop environment can find them - π Smart Detection: Automatically extracts app information (name, description, categories) from AppImages
- π¨ Icon Handling: Extracts and installs icons from AppImages to the correct system location
- βοΈ Customizable: Override detected information with command-line options
- π Multiple Locations: Supports both user (
~/.local/share/applications) and system-wide installation - π‘οΈ Error Handling: Gracefully handles malformed AppImages and missing resources
curl -fsSL https://kanishkk.xyz/appimage2desktop | bashgit clone https://github.com/homelabshq/appimage2desktop.git
cd appimage2desktop
chmod +x appimage2desktop.py
# Optional: Create symlink for easier access
ln -s $(pwd)/appimage2desktop.py ~/.local/bin/appimage2desktop- Python 3.6+
- Linux with desktop environment (GNOME, KDE, XFCE, etc.)
- AppImages with extraction support (
--appimage-extract) (optional)
Generate a desktop file with auto-detected information:
python3 appimage2desktop.py MyApp.AppImage# Custom application name and description
python3 appimage2desktop.py MyApp.AppImage \
--name "My Custom App" \
--comment "A fantastic application for productivity"
# Specify custom output directory
python3 appimage2desktop.py MyApp.AppImage \
--output-dir ~/.local/share/applications
# Set custom categories (follows freedesktop.org specification)
python3 appimage2desktop.py MyApp.AppImage \
--categories "Graphics;Photography;Utility;"
# List available desktop directories
python3 appimage2desktop.py --list-dirs| Option | Description |
|---|---|
appimage |
Path to the AppImage file (required) |
-n, --name |
Override application name |
-c, --comment |
Override application description |
--categories |
Set desktop categories (e.g., "Graphics;Utility;") |
-o, --output-dir |
Specify output directory for .desktop file |
--list-dirs |
List available desktop file directories |
- AppImage Analysis: The tool extracts the AppImage contents temporarily using
--appimage-extract - Information Extraction: Parses any existing
.desktopfiles and extracts metadata - Icon Processing: Finds the best available icon and copies it to
~/.local/share/icons/ - Desktop File Generation: Creates a properly formatted
.desktopfile - Integration: Places the file in the appropriate directory where desktop environments look for applications
The tool uses the following directories:
-
Desktop Files:
~/.local/share/applications/(user applications, default)/usr/share/applications/(system-wide, requires sudo)/usr/local/share/applications/(local system-wide)
-
Icons:
~/.local/share/icons/(user icons)
$ python3 appimage2desktop.py Firefox.AppImage
Analyzing AppImage: Firefox.AppImage
β Desktop file created: /home/user/.local/share/applications/Firefox.desktop
β Success! Desktop file created at: /home/user/.local/share/applications/Firefox.desktop
The application should now appear in your application launcher.$ python3 appimage2desktop.py MyApp.AppImage \
--name "My Awesome App" \
--comment "The best app ever created" \
--categories "Utility;Development;"
Analyzing AppImage: MyApp.AppImage
β Desktop file created: /home/user/.local/share/applications/My-Awesome-App.desktop
β Success! Desktop file created at: /home/user/.local/share/applications/My-Awesome-App.desktop
The application should now appear in your application launcher.$ python3 appimage2desktop.py --list-dirs
Available desktop file directories:
1. /home/user/.local/share/applications (exists: β, writable: β)
2. /usr/share/applications (exists: β, writable: β)
3. /usr/local/share/applications (exists: β, writable: β)The tool generates desktop files following the freedesktop.org Desktop Entry Specification:
[Desktop Entry]
Version=1.0
Type=Application
Name=Application Name
Comment=Application description
Exec=/path/to/app.AppImage
Icon=/home/user/.local/share/icons/app-icon.png
Terminal=false
Categories=Application;Utility;
StartupNotify=trueIf you get extraction errors:
# Make sure the AppImage is executable
chmod +x MyApp.AppImage
# Test manual extraction
./MyApp.AppImage --appimage-extract- Refresh your desktop environment's application cache:
# For GNOME sudo update-desktop-database ~/.local/share/applications/ # For KDE kbuildsycoca5 --noincremental
- Log out and log back in
- Check if the desktop file was created in the correct location
For system-wide installation:
sudo python3 appimage2desktop.py MyApp.AppImage \
--output-dir /usr/share/applicationsThis tool works with any desktop environment that follows the freedesktop.org standards, including:
- GNOME
- KDE Plasma
- XFCE
- MATE
- Cinnamon
- Elementary OS
- And many others
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git clone https://github.com/homelabshq/appimage2desktop.git
cd appimage2desktop
# Run the script in development mode
python3 appimage2desktop.py --helpThis project is licensed under the MIT License - see the LICENSE file for details.
- AppImage project for the portable application format
- freedesktop.org for desktop integration standards
- The Linux desktop community for making application integration possible
- AppImageLauncher - Full AppImage integration suite
- appimaged - Daemon for automatic AppImage integration
- AppImageKit - Tools for creating AppImages
β If this tool helped you, please consider giving it a star on GitHub!