Newbie question about running AppImage

How to run “AppImage” extensions easily?

For example, this: LM Studio Beta Releases

When we download it and try to execute we receive the error:

bash: ./LM_Studio-0.2.14-beta-1.AppImage: cannot execute: required file not found

I had the same issue with the SQLiteStudio, for example, and I solved that with a very weird .nix file:

{ pkgs ? import <nixpkgs> { } }:

let
  qt = pkgs.qt515;
  sqliteStudioPath = "/home/xxx/app/SQLiteStudio";  
in
pkgs.mkShell {
  # Just for some extra debug-useful visibility
  QT_DEBUG_PLUGINS = 1;

  LD_LIBRARY_PATH = with pkgs; pkgs.lib.makeLibraryPath [
    qt5.full
    zlib
    krb5
    glib
    patchelf
    readline
    stdenv.cc.cc
    libGL
    zlib
    glib # libgthread-2.0.so
    xorg.libX11 # libX11-xcb.so
    xorg.libxcb # libxcb-shm.so
    xorg.xcbutilwm # libxcb-icccm.so
    xorg.xcbutil # libxcb-util.so
    xorg.xcbutilimage # libxcb-image.so
    xorg.xcbutilkeysyms # libxcb-keysyms.so
    xorg.xcbutilrenderutil # libxcb-renderutil.so
    xorg.xcbutilrenderutil # libxcb-renderutil.so
    dbus # libdbus-1.so
    libxkbcommon # libxkbcommon-x11.so
    fontconfig
    freetype
  ];

  shellHook = ''
    export LD_LIBRARY_PATH=${sqliteStudioPath}/lib:${pkgs.libGL.out}/lib:${pkgs.zlib.out}/lib:${pkgs.glib.out}/lib:${pkgs.qt5.full.out}/lib:${pkgs.xorg.libX11.out}/lib:${pkgs.xorg.libxcb.out}/lib:${pkgs.xorg.xcbutilwm.out}/lib:${pkgs.xorg.xcbutil.out}/lib:${pkgs.xorg.xcbutilimage.out}/lib:${pkgs.xorg.xcbutilkeysyms.out}/lib:${pkgs.xorg.xcbutilrenderutil.out}/lib:${pkgs.dbus.out}/lib:${pkgs.libxkbcommon.out}/lib:${pkgs.fontconfig.out}/lib:${pkgs.freetype.out}/lib:$LD_LIBRARY_PATH
    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./sqlitestudio
    patchelf --set-rpath "${pkgs.libGL.out}/lib:${pkgs.zlib.out}/lib:${pkgs.glib.out}/lib:${pkgs.qt5.full.out}/lib:${pkgs.xorg.libX11.out}/lib:${pkgs.xorg.libxcb.out}/lib:${pkgs.xorg.xcbutilwm.out}/lib:${pkgs.xorg.xcbutil.out}/lib:${pkgs.xorg.xcbutilimage.out}/lib:${pkgs.xorg.xcbutilkeysyms.out}/lib:${pkgs.xorg.xcbutilrenderutil.out}/lib:${pkgs.dbus.out}/lib:${pkgs.libxkbcommon.out}/lib:${pkgs.fontconfig.out}/lib:${pkgs.freetype.out}/lib" ./sqlitestudio
    export QT_PLUGIN_PATH="${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.version}/plugins/platforms"
  '';
}

But to do that I made a lot of trial and error + Google + ChatGPT.

There is an easy way to run an AppImage without creating a bizarre nix file?

There is an old topic here: Can’t run an AppImage app but I think it’s too old (2020). The solution is the same yet? Using pkgs.appimageTools ?

Thank you.

OK. Replying myself:

Just install the package “appimage-run” and:

appimage-run <whatever>.AppImage

1 Like