Repository navigation
Unpacked AppImages: libraries and APPDIR for programs named inside them, and the guide on running unpacked - #486
Merged
elripalda merged 4 commits intoNov 24, 2026
Conversation
With Easy Setup on, MKW Recomp closed at once with code 127 on Linux: "mkw: error while loading shared libraries: libvpx.so.6". Its profile names mkw, which since AppImages are unpacked (elripalda#310) is found in the game's folder and started by itself. Its AppRun is what puts the AppImage's lib/ folder on LD_LIBRARY_PATH, so without it the libraries mkw ships with weren't found. Before elripalda#310 the profile's program wasn't there and the AppImage started instead. A program inside an unpacked AppImage that isn't its AppRun now gets the AppImage's own library folders first on LD_LIBRARY_PATH (lib, lib64, usr/lib, usr/lib64 and usr/lib/<arch>-linux-gnu, those that exist), with the PC's own list after them, for Play and for a setup step. A profile can't set that variable itself. The developer guide says so beside the AppRun rules. On bazzite-kde, a fresh MKW install with Easy Setup on stopped with the libvpx error on the old build and reached the game's start screen on this one.
… out are named What the AppImage runtime sets for the program it starts now comes from one place (appimage_vars), the same for Play and a setup step: APPDIR (the AppImage's folder), OWD (the folder it starts in) and, for AppRun, ARGV0. A program named inside the AppImage instead of its AppRun gets APPDIR and OWD too, besides the AppImage's libraries, so one that finds its files through APPDIR does when a profile names it. A program in a plain folder gets nothing of this. APPIMAGE is still never set. The trail named only how many links an unpack left out (absolute ones, or ones leading out of the AppImage). It now names the first five and where they pointed, so a game that won't start for a missing file is found. Tried on bazzite-kde with real releases: Shipwright, Savage Wind, SpartanPort, Dusklight, Wind Waker HD, Melee, Super Mario World, Prime, LAS and MKW all start from their unpacked folders with Easy Setup skipped, with APPDIR, OWD and ARGV0 set. With Easy Setup on, Wind Waker HD, Ridge Racer Type 4, LAS and UltraCombo start (UltraCombo's program named directly, with APPDIR and its lib folder); the others ask for the player's copy first, as they should.
…yours run that way The AppImages section now says why every Linux build of the launcher unpacks an AppImage instead of running it: mounting needs FUSE (and can't happen in the Flatpak at all), a mount is read-only and moves on every start, and updates, saves and mods need a folder they can reach. A new part, "Your AppImage has to run unpacked", asks for the same thing as a tarball, with a way to try it (--appimage-extract, then AppRun with APPIMAGE unset) and what makes it work: find files through APPDIR or /proc/self/exe, bring libraries an rpath or AppRun finds, don't move yourself out of your folder, don't bundle system libraries an AppRun's LD_LIBRARY_PATH would hand to cp and mkdir, and keep links inside. The release rules and Recomp Standards point there, and the AppRun bullets mention OWD and the links left out.
Xarishark
marked this pull request as ready for review
November 23, 2026 23:55
…e, and check an AppImage entry as its AppRun A start.program or prepare.program that names a program inside an unpacked AppImage (mkw-recomp's mkw) starts without its AppRun. The launcher gives it the AppImage's library folders, APPDIR and OWD, but nothing else that AppRun sets up. Developer tools now say so in yellow, and say when that's fine: when the program runs on its own. They use the same appimage_root as the start code, so the check and what Play does can't drift apart. Checking a release's own recomplauncher.json, developer tools read it as written, without the AppRun mapping Play applies (profile::to_apprun). So every profile that names its AppImage, as the guide asks, got a red "None of start.program is in this folder" once the AppImage was unpacked, while Play started it fine. The file is now read as Play reads it. The developer guide says when to name a program inside an AppImage and that developer tools warn about it. Tested on bazzite-kde with a debug build and real releases: MKW (profile names mkw) shows "Play starts mkw" with the warning; Savage Wind (profile names its AppImage) shows "Play starts AppRun --game", with no error. cargo test: 1019 passed, 4 of them new.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Every Linux build of the launcher plays AppImages from an unpacked folder (#310). This makes that sturdier, and tells developers why and what their AppImage has to do for it.
A program named inside an unpacked AppImage couldn't find the libraries it ships with
With Easy Setup on, MKW Recomp closed at once:
mkw: error while loading shared libraries: libvpx.so.6(code 127). Its catalog profile namesmkw, which since #310 is found in the game's folder and started by itself. ItsAppRunis what puts the AppImage'slib/onLD_LIBRARY_PATH, and a profile can't set that variable. Before #310 the profile's program wasn't there and the AppImage started instead. 20 catalog AppImage games name a program inside the AppImage like this (MKW, Astral Chain, XCX, XC2, MetroFuse, KNID, UltraCombo and others).appimage_libs: a program inside an unpacked AppImage (the nearest folder with anAppRun, within the game's folder) that isn'tAppRungets the AppImage's library folders first onLD_LIBRARY_PATH(lib,lib64,usr/lib,usr/lib64,usr/lib/<arch>-linux-gnu, those that exist), then the PC's own list (sysenv::for_games, the PC's value without the launcher's own AppImage folders).appimage_vars: what the AppImage runtime sets for the program it starts now comes from one place, for Play and setup steps alike.APPDIR(the AppImage's folder),OWD(the folder it starts in), and forAppRunARGV0. A program named inside the AppImage getsAPPDIRandOWDtoo. Plain folders get nothing.APPIMAGEis still never set.Developer tools
start.programorprepare.programnames a program inside an unpacked AppImage that isn't itsAppRun(MKW'smkw), developer tools show a yellow warning. It says what that program misses (everything itsAppRunsets up besides the library folders,APPDIRandOWD) and that it's fine when the program runs on its own (an rpath like$ORIGIN/lib). It uses the sameappimage_rootas the start code, so the check and what Play does can't drift apart.recomplauncher.jsonwithout theAppRunmapping Play applies (profile::to_apprun). So once the AppImage was unpacked, every profile naming its AppImage, as the guide asks, got a red "None of start.program is in this folder", while Play started it fine. The file is now read as Play reads it (read_profile). This was already onmain.The developer guide
--appimage-extract, thenAppRunwithAPPIMAGEunset), and covers:APPDIRor/proc/self/exe$ORIGIN/lib) orAppRunfindsAppRuncopiesmkwto~/.local/share)AppRun'sLD_LIBRARY_PATHhands tocpandmkdir(Super Mario World'slibpcre2warnings)AppRunbullets mentionOWDand the links left out, and say to name a program inside the AppImage only when it runs on its own, which developer tools warn about.For the website (SDK guide): explain why the launcher plays Linux AppImages unpacked (no FUSE, the Flatpak, read-only moving mounts, updates and saves need a folder). Add "Your AppImage has to run unpacked" with its test steps (
--appimage-extract, thenAppRunwithoutAPPIMAGE). Say that astart.programnaming a program inside an AppImage getsAPPDIR,OWDand the AppImage's library folders onLD_LIBRARY_PATH, but nothing else itsAppRunsets, and that developer tools warn about it: name the AppImage unless the program runs on its own.How you tested it
On bazzite-kde (Bazzite, KDE), a debug build of this branch, each game freshly installed from its real release (the AppImage unpacked into a plain folder), then started with
--play(the start code the Play button uses). For each game the check read the running process's environment, its output and the trail.Easy Setup skipped (its
AppRun): Shipwright, Savage Wind, SpartanPort, Dusklight, Wind Waker HD, Melee, Super Mario World, Prime, LAS and MKW all start from their unpacked folders withAPPDIR,OWDandARGV0set. There were no library, read-only or missing-file errors; Shipwright, Dusklight and Melee log their normal start.Easy Setup on:
AppRun) and LAS start throughAppRun.APPDIR,OWDandLD_LIBRARY_PATH=<game>/lib, and says it needs its game files. The released Beta 68 also starts it, so its program finds its libraries on its own.MKW with Easy Setup on: the Beta 67-era build stopped with the
libvpx.so.6error. This branch reached MKW's own start screen. AngeloAscheri confirmed the same on a second Bazzite PC with a real dump (comment on #467), with/proc/<pid>/mapsshowinglibvpx,libSDL3andlibopusloaded from the game'slib/.Developer tools on real installs: MKW (profile names
mkw) shows "Play starts mkw" with the new warning. Savage Wind (profile names its AppImage) shows "Play starts AppRun --game" with no error; before, it showed the red "None of start.program is in this folder".In distrobox:
cargo testpasses all 1019, including 13 new tests (4 for the library folders, 3 forappimage_vars, 2 for the link note, 4 for developer tools).node --test tests/*.test.cjspasses all 766.npm testpassesnode --test tests/*.test.cjspassesTried it in the launcher (bazzite-kde, debug build, real releases)
Not tried: a game whose profile names a program inside the AppImage and gets as far as playing with the player's own files, other than MKW on AngeloAscheri's PC.
Checklist
recomplauncher.json: the schema and docs are updated too (no new fields; the guide says how AppImages run)