AppImageKit Documentation

repository·main·Indexed 27 days ago

https://github.com/appimage/appimagekit

Technology for the AppImage format, enabling the packaging of Linux applications into single, portable files that run across distributions without installation or root privileges. Includes documentation on special command line arguments for debugging and extraction, as well as methods for enabling portable configuration using specific directories.

Tokens
792
Snippets
1
Records
2
Agent score
44%

What's inside AppImageKit

  1. Enable portable configuration using special directories

    main

    You can force an AppImage to store its configuration files alongside the executable instead of in the user's $HOME directory. This is ideal for portable use cases (e.g., running from a USB stick).

    To achieve this, create one of the following directories in the same folder as the AppImage:

    • <AppImageName>.home: Sets $HOME to this directory before executing the application.
    • <AppImageName>.config: Sets $XDG_CONFIG_HOME to this directory before executing the application.

    Example for portable settings:

    # Make the AppImage executable
    chmod a+x Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
    
    # Create a .config directory to redirect settings
    mkdir Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config
    
    # Run the AppImage; settings will now be written to the .config directory
    ./Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
    # Download Leafpad AppImage and make it executable
    chmod a+x Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
    
    # Create a directory with the same name as the AppImage plus the ".config" extension
    # in the same directory as the AppImage
    mkdir Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config
    
    # Run Leafpad, change some setting (e.g., change the default font size) then close Leafpad
    ./Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
    
    # Now, check where the settings were written:
    linux@linux:~> find Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config
    (...)
    Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config/leafpad/leafpadrc
  2. Use special command line arguments with AppImages

    main

    AppImages built with recent versions of AppImageKit support several special command line arguments to control behavior beyond running the contained application. These are useful for debugging, extracting contents, or inspecting the filesystem image.

    Available arguments:

    • --appimage-help: Prints help options.
    • --appimage-offset: Prints the offset where the embedded filesystem image starts and exits. Useful for manual loop-mounting with mount -o loop,offset=....
    • --appimage-extract: Extracts the contents of the embedded filesystem image and exits. Useful on systems without FUSE.
    • --appimage-mount: Mounts the filesystem image, prints the mount point, and waits until killed. Useful for inspecting contents without running the application.
    • --appimage-version: Prints the AppImageKit version and exits.
    • --appimage-updateinformation: Prints embedded update information and exits. Useful for debugging binary delta updates.
    • --appimage-signature: Prints the embedded digital signature and exits. To validate signatures, use the validate tool in AppImageKit.