Restore PATH for native non-Steam shortcuts - #290
Open
tslmy wants to merge 1 commit into
Open
Conversation
tslmy
marked this pull request as ready for review
August 20, 2026 18:40
tslmy
marked this pull request as draft
August 20, 2026 18:42
tslmy
marked this pull request as ready for review
August 20, 2026 18:42
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.
Summary
PATHfor every game command, not only AppImagesPATHand the AppImage-specific append behaviorPATHSymptom
On an AYN Thor, Heroic games launch from KDE Desktop Mode, but the built-in controller is not usable there. Adding the games to Steam as non-Steam shortcuts supplies Steam Input's virtual controller, but in Game Mode the shortcuts briefly report that they are running and then stop before the game appears.
For Caravan SandWitch, Heroic's bundled Legendary helper terminated with:
The diagnosis, successful workaround, and end-user instructions are documented in this Discord thread.
Root cause
Steam can omit
PATHfrom the environment of a non-Steam shortcut in Game Mode. The top-level native ARM64 Heroic executable still starts because Steam invokes it by absolute path, but Heroic's bundled Legendary/Python helper cannot reliably start its child processes; its multiprocessing resource-tracker pipe closes and the helper aborts withBrokenPipeError.armada-game-launchalready repairs an incompletePATHfor AppImages (the failure reported in #103), but only when an AppImage is present in the command line. Packaged native launchers such as/usr/lib64/heroic/heroicbypass that branch, so the missing environment variable reaches Heroic unchanged.Fix
Generalize the existing path preparation so an absent or empty
PATHis seeded with:An existing
PATHremains byte-for-byte unchanged for native commands. AppImages continue to have any missing standard paths appended forfusermountdiscovery. Per-game environment settings are still applied afterward, so an explicit user override keeps taking precedence.Validation
Root-cause reproduction
PATHreproduced the LegendaryBrokenPipeError; adding/usr/local/bin:/usr/bin:/binlet Legendary continue to authentication.On-device OS-wide test
Tested the PR launcher directly on the same AYN Thor without building or flashing a new image:
/usr/libexec/armada/armada-game-launch./etc/armada/game-tweaks.jsonfrom the active configuration and verified it was absent, so neither game had the earlier per-gamePATHworkaround.Sanitized process evidence:
Both games progressed past Heroic/Legendary into their real Windows executables, with no new
BrokenPipeError. In both launches, Wine'swinedevice.exeheld Steam's virtual controller device at/dev/input/event12, confirming the Game Mode controller path was active. The games were tested sequentially and stopped afterward; Steam remained running.Regression checks
PATH.bash -n tests/perf-settings-test.shpython3 -m py_compile system_files/usr/libexec/armada/armada-game-launch