launcher: write the Linux run script to /tmp instead of the game directory (#974) #996
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!996
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/996/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Jitheswar on GitHub · 2026-10-03 09:36 UTC · original
fix/linux-temporary-run-script→main· +325 −112 · 6 files · 1 commits · closed without mergingFixes #974.
On Linux the launcher wrote
kyty_run.shnext to the emulator binary, which fails whenthat directory is read-only.
Changes
src/launcher/linux/linuxRunScript.cpp.QTemporaryFileas/tmp/kytyps5_run_XXXXXX.sh(user-onlypermissions, unique per launch).
/tmpis fixed rather thanQDir::tempPath()so thepath can't contain spaces that terminals which re-parse their command line would split.
bash <script>.start, and removes this user's leftover scripts older than one day on the next launch.
launcher_run_scriptctest and include it in Linux CI.Testing
I had rebuild launcher and launcher_run_script_tests (both built successfully) and run ctest --test-dir Build/linux -R '^launcher_run_script$' --output-on-failure. The result was 1/1 passed (launcher_run_script, 0.01 s), with no /tmp/kytyps5_run* files left afterwards. That test makes its fake game folder read-only and checks that the script is created in /tmp and that arguments with spaces, apostrophes and empty values are passed through unchanged
Known limitations
waitForStartedtimes out, the script stays until the next launch's cleanup./tmpwon't see the script./tmp.AI involvement
I used AI tools to draft the code, the test and this description, and an AI review pass
suggested the
/tmpapproach and the comments. I reviewed the changes, ran the testslisted above myself, and I'm responsible for the submission.
@coderabbitai[bot] on GitHub · 2026-10-03 09:41 UTC · original
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
d938e35c-7d35-41d1-8a5b-60ab28e9a136📥 Commits
Reviewing files that changed from the base of the PR and between
e6cb880adband30a6dacd4c.📒 Files selected for processing (6)
.github/workflows/build.ymlsrc/launcher/CMakeLists.txtsrc/launcher/include/linuxRunScript.hsrc/launcher/linux/linuxRunScript.cppsrc/launcher/src/mainDialog.cpptests/LauncherRunScriptTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
Linux launcher script creation and terminal selection moved into
LinuxRunScript::Prepare. The helper creates a temporary Bash script, configuresQProcess, and returns failure if script creation or flushing fails. The launcher handles preparation and process-start failures. A standalone test covers script preparation and execution, and the Linux workflow builds and runs that test.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix · Severity of issue fixed: Low
Merge Risk: ⚪ Minimal · up to
30a6dThe Linux launcher now writes its run script to a private temporary file instead of the game directory. No concrete merge-blocking risk was found.
Security Architecture Review
Security architecture risk: 🔵 Low · up to
30a6dPrivate, uniquely named scripts improve isolation while preserving existing execution authority. No new cross-user attack path was established. Remaining uncertainty concerns filesystem isolation between the launcher and terminal, and cleanup after interrupted launches.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
#974] requests thatkyty_run.shbe generated at build time.LinuxRunScript::Preparestill creates the script at runtime withQTemporaryFile, now under/tmp. This avoids writing beside the emu…✅ Passed checks (3 passed)
#974]. No unrelated changes are identified.Full details: Linked Issues check
Explanation
[
#974] requests thatkyty_run.shbe generated at build time.LinuxRunScript::Preparestill creates the script at runtime withQTemporaryFile, now under/tmp. This avoids writing beside the emulator but does not meet the build-time generation requirement.Full details: Docstring Coverage
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed