fix(sandbox): the title bar on GNOME is libdecor's Cairo plugin, so GTK no longer aborts the game #3106
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3106
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/gnome-libdecor-abort"
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?
Summary
Since #3132 the sandbox is off by default, so on current
mainthis crash needsHOS_SANDBOX=1orstrict. Nightlies from 1007 until #3132 have it by default. This fixes it for sandboxed games.On GNOME Wayland (reported on Arch, nightly-1041) the game closes a few seconds after starting. GNOME draws no title bar, so libdecor draws one, with its GTK plugin. GTK loads its icons through gdk-pixbuf, which on Arch uses glycin, and glycin starts a loader program. The game's sandbox refuses to start programs, so GTK fails to load even its "image missing" icon and aborts (
gtkiconhelper.c,ensure_surface_for_gicon).The builder now gives a sandboxed game a
LIBDECOR_PLUGIN_DIRholding only libdecor's Cairo plugin. GNOME players keep a title bar with its buttons and resize edges, a plainer one. The plugin is looked for beside thelibdecor-0.so.0thatldconfig -plists, then in the usual library folders. Where it is not installed, or the plugin folder is a link or holds anything else, the window has no title bar.HOS_SANDBOX=0and a player's ownLIBDECOR_PLUGIN_DIRare left alone.To see it on main: start the game with
HOS_SANDBOX=1in a GNOME Wayland session whose gdk-pixbuf uses glycin.Read first:
libdecor_plugins,cairo_plugin,holds_only_oursandcairo_aloneinbuilder/crates/build-core/src/sandbox_linux.rs, its call insys.rs, and the new read-only rule inrules.Testing
Tested:
4abfe890: the new test fails on the first commit (exit 3, no plugin folder given) and passes with the fix;build-core's tests: 224 passed, 0 failed, 1 ignored.execveblocked by seccomp (CachyOS), a small SDL2 window: with libdecor's own plugin folder it aborts with the reported assert (gtkiconhelper.c:495); with a folder holding the Cairo plugin alone it survives and draws a title bar with its buttons. No Landlock in this run.gtk3 3.24.52-2, ends in the same assert.Not run: clippy and
mise run testlocally. The change has not run in the game, on any desktop.Still to test:
Measurements
Nothing to measure: one environment variable and a link made at start; no rendering or presentation code changes.
Risks
ldconfig -pdoes not listlibdecor-0.so.0(NixOS) and the plugin is in none of the folders searched, there is no title bar.~/.local/share/longshot-libdecor; the game may list it, not read or write what is in it.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (Not run.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.mainand here, for a change that shows on screen. (Needs a GNOME session.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
WIP: fix(host): no libdecor title bar, so GTK no longer aborts the sandboxed game on GNOMEto WIP: fix(sandbox): the title bar on GNOME is libdecor's Cairo plugin, so GTK no longer aborts the gameChanged approach (old head
66c426dd, now45ab0863): instead of turning libdecor off, the builder gives the sandboxed game a plugin folder holding only the Cairo plugin, so GNOME keeps a title bar and resize edges. The new Rust is not compiled or tested yet.66c426dd8945ab086310@review
Recommendation: Request changes. The shared plugin directory can widen the sandbox’s read access and can lose its Cairo link during concurrent launches. The fix also removes window decorations on installations where libdecor finds its plugin outside the hard-coded paths.
The builder directs sandboxed Linux games to a Cairo-only libdecor directory to avoid GTK’s blocked icon loader. This can prevent the reported GNOME abort, but it changes decorations on all sandboxed Linux launches and introduces filesystem and concurrency risks.
Blocking (2): must change before merging.
builder/crates/build-core/src/sandbox_linux.rs:664: The new Landlock rule follows a pre-existing symlink for the plugin directory and can grant read access to an unrelated directory. (more on the line) Do: Create and validate a dedicated plugin directory without following an existing directory symlink, and reject any resolved location outside the intended private directory before adding the rule.builder/crates/build-core/src/sandbox_linux.rs:322: The forced plugin directory hides a working system plugin whenever its installation path is outside the five hard-coded locations. (more on the line) Do: Discover the plugin in the actual libdecor installation or provide a reliable compatible fallback before overriding its search directory.Should fix (3): not blocking, but worth doing before merging.
builder/crates/build-core/src/sandbox_linux.rs:338: Every launch removes and recreates the same shared link without coordinating with other launches or games already starting. (more on the line) Do: Use a stable per-launch directory or publish a prepared link atomically without removing the link another launch may be using.builder/crates/build-core/src/sandbox_linux.rs:336: The directory is reused without removing or rejecting other plugins, so it is not necessarily Cairo-only. (more on the line) Do: Use a freshly created dedicated directory or verify that no other loadable plugins are present before passing it to libdecor.builder/crates/build-core/src/sandbox_linux.rs:319: A relative XDG_DATA_HOME is used directly even though the child can have a different working directory and Landlock accepts only absolute rule paths. (more on the line) Do: Ignore relative XDG_DATA_HOME values and fall back to the absolute HOME-based data directory, consistently with the directory used for the Landlock rule.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-core/src/sys.rs:212: The changed launch path has not been exercised in the game on the affected desktop or the other Wayland paths it changes. (more on the line) Do: Run the game on the reported GNOME/glycin setup and check startup, moving, resizing and closing; also check windowed launches on KDE and sway.@fixcan do L1, L2, L3, L4 and L5.Questions (1) (not confirmed from the code; they don't hold the recommendation)
builder/crates/build-core/src/sandbox_linux.rs:2739: Is there a supported installation where the production search fails to find an available Cairo plugin and this test still passes?Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The reported headless SDL2 experiment reproduced the GTK abort and showed a Cairo title bar with seccomp, but it did not run this Rust change, Landlock, or the game. No game run or compiled test result is reported.
Other systems: The environment override applies to sandboxed Linux launches regardless of desktop, including KDE, sway and Steam Deck sessions; Windows is unaffected. Landlock follows the directory when adding its rule. GNOME, KDE and sway game runs remain outstanding.
Switches: LIBDECOR_PLUGIN_DIR is now set by default for sandboxed Linux games unless already present; HOS_SANDBOX=0 and shader preparation leave it alone. The forced default is unsafe where the installed Cairo plugin is outside the searched paths.
Reviewed:
45ab086310against76092c5e5a: Read the diff, both commit messages, repository rules, PR template, fix-with-test instructions, changed functions and tests, their sandbox and launch callers, and relevant documentation and standards. Skimmed the remainder of the large sandbox and system files; their full contents were not reviewed. docs/review-checklist.md and the adjacent Tooling AGENTS.md were absent. No translations or generated files changed.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run during review. All listed CI checks were still running; the author reports that the Rust has not yet been compiled or tested.
Overlaps and merge order: Not checked; the network was closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -292,0 +316,4 @@{return;}let data = var(&env, "XDG_DATA_HOME")L5 (should fix): A relative XDG_DATA_HOME is used directly even though the child can have a different working directory and Landlock accepts only absolute rule paths.
When: With XDG_DATA_HOME=data and a game command whose working directory differs from the builder’s, the builder creates data/longshot/libdecor relative to itself, while libdecor resolves it relative to the game. The read rule is also discarded as relative, leaving the game without the intended plugin.
Do: Ignore relative XDG_DATA_HOME values and fall back to the absolute HOME-based data directory, consistently with the directory used for the Landlock rule.
@ -292,0 +319,4 @@let data = var(&env, "XDG_DATA_HOME").map(PathBuf::from).or_else(|| var(&env, "HOME").map(|h| Path::new(h).join(".local/share")));let plugin = LIBDECOR_CAIRO.iter().map(Path::new).find(|p| p.is_file());L3 (blocking): The forced plugin directory hides a working system plugin whenever its installation path is outside the five hard-coded locations.
When: On a Wayland installation where libdecor normally discovers its Cairo plugin in another prefix, the search returns None and the builder supplies an empty directory. A window that previously had client-side decorations loses its title bar, close button and resize edges.
Do: Discover the plugin in the actual libdecor installation or provide a reliable compatible fallback before overriding its search directory.
@ -292,0 +333,4 @@/// `dir` made to hold a link to `plugin` and no other plugin of ours.fn cairo_alone(dir: &Path, plugin: Option<&Path>) -> std::io::Result<()> {std::fs::create_dir_all(dir)?;L4 (should fix): The directory is reused without removing or rejecting other plugins, so it is not necessarily Cairo-only.
When: If the directory already contains a GTK plugin, cairo_alone replaces only libdecor-cairo.so and reports success. Libdecor can still load GTK from that directory and hit the same blocked-loader abort.
Do: Use a freshly created dedicated directory or verify that no other loadable plugins are present before passing it to libdecor.
@ -292,0 +335,4 @@fn cairo_alone(dir: &Path, plugin: Option<&Path>) -> std::io::Result<()> {std::fs::create_dir_all(dir)?;let link = dir.join("libdecor-cairo.so");match std::fs::remove_file(&link) {L2 (should fix): Every launch removes and recreates the same shared link without coordinating with other launches or games already starting.
When: When two launches overlap, one can create the link between the other’s remove_file and symlink calls. The second receives EEXIST and supplies /dev/null as its plugin directory; a game loading during the removal window can also miss the plugin. On GNOME it then has no title bar or its controls.
Do: Use a stable per-launch directory or publish a prepared link atomically without removing the link another launch may be using.
@ -608,6 +661,7 @@ pub fn rules(input: &Input, handled: u64) -> (Vec<Rule>, usize) {}r.add_p(i.tmp.as_deref(), RW, "the private temporary folder (TMPDIR)");r.add_in(i.xdg_data_home.as_deref(), b"longshot/ngx", RX, "DLSS's runtime");r.add_in(i.xdg_data_home.as_deref(), LIBDECOR_DIR.as_bytes(), RO, "the title bar's plugin (libdecor_plugins)");L1 (blocking): The new Landlock rule follows a pre-existing symlink for the plugin directory and can grant read access to an unrelated directory.
When: If ~/.local/share/longshot/libdecor points to the user’s home, create_dir_all accepts it and the rule applier opens that path following the link. The resulting read rule covers the home, so the confined game can read files the sandbox otherwise keeps private.
Do: Create and validate a dedicated plugin directory without following an existing directory symlink, and reject any resolved location outside the intended private directory before adding the rule.
@ -209,2 +209,4 @@// (the pads the builder's, the Steam Deck's own sensors with them: every start, confined or not)let mut pads = crate::sandbox_linux::pads_slot(cmd);// (a sandboxed game's title bar plugin, before the rules that let it be read are made)crate::sandbox_linux::libdecor_plugins(cmd);L6 (should fix): The changed launch path has not been exercised in the game on the affected desktop or the other Wayland paths it changes.
When: The reported SDL2 experiment omitted Landlock and did not execute this builder code, so it cannot show that the game loads the plugin and retains usable decorations.
Do: Run the game on the reported GNOME/glycin setup and check startup, moving, resizing and closing; also check windowed launches on KDE and sway.
45ab086310026fe6e668Review addressed (old head
45ab0863). None of this is compiled or tested yet; the tests and clippy are waiting in the job queue.own_folder).libdecor-0.so.0the system loads, whatever its prefix, then in the listed folders. With none found the folder stays empty on purpose: no title bar rather than GTK's abort..sois not given.XDG_DATA_HOME(orHOME) is ignored./usr/libhas the Cairo plugin and the folder lacks it.@review
Recommendation: Request changes. The new sandbox rule can expose an unrelated directory through a symlinked parent, and the new unsafe code conflicts with the repository's stated Rust rule. Plugin discovery still misses valid installations outside its assumed layouts.
The change gives sandboxed Linux games a Cairo-only libdecor plugin directory to avoid GTK's glycin-related abort while retaining window decorations. It adds plugin discovery and sandbox rules, with fallback cases that can remove the title bar.
Blocking (2): must change before merging.
builder/crates/build-core/src/sandbox_linux.rs:322: The new unsafe allowance is outside the locations permitted by the builder's documented Rust rule. When: cairo_plugin permits unsafe code in sandbox_linux.rs, while docs/dev/standards.md permits it only in the named Windows and disk system-call modules. Do: Use an allowed safe interface or place the system calls in a location permitted by the repository rule.builder/crates/build-core/src/sandbox_linux.rs:1403: Checking only the final directory does not prevent a symlinked parent from redirecting the new read rule. (more on the line) Do: Validate or securely resolve the path components before granting the rule, and reject redirected paths outside the intended data directory.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-core/src/sys.rs:212: The changed launch path has not been exercised in the game on the affected desktop or the other Wayland paths it changes. When: The reported SDL2 experiment omitted Landlock and did not execute this builder code, so it cannot show that the game loads the plugin and retains usable decorations. Do: Run the game on the reported GNOME/glycin setup and check startup, moving, resizing and closing; also check windowed launches on KDE and sway.@fixcan do L3 and L7.Since the last review (on
45ab086310)Resolved: L1 (The new Landlock rule follows a pre-existing symlink for the plugin directory and can gran…); L2 (Every launch removes and recreates the same shared link without coordinating with other la…); L4 (The directory is reused without removing or rejecting other plugins, so it is not necessar…); L5 (A relative XDG_DATA_HOME is used directly even though the child can have a different worki…)
Still open: L3 (The new unsafe allowance is outside the locations permitted by the builder's documented Ru…); L6 (The changed launch path has not been exercised in the game on the affected desktop or the…)
New: L7 (Checking only the final directory does not prevent a symlinked parent from redirecting the…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: a separate SDL2 window survived with the Cairo plugin under seccomp, but the changed Rust and the game have not been run on the affected desktop.
Other systems: The launch path affects sandboxed Linux games on GNOME, KDE, sway and other desktops, including Steam Deck; game runs are still needed. Windows does not use this Linux-specific path.
Switches: No Longshot switch added or changed. HOS_SANDBOX=0 and an existing LIBDECOR_PLUGIN_DIR are preserved; otherwise the builder sets LIBDECOR_PLUGIN_DIR for sandboxed games.
Reviewed:
026fe6e668against76092c5e5a: Read the repository rules and PR template, the change and commit history, and relevant sandbox and launch code. The long sandbox file and reference documentation were partly skimmed; the game and tests were not run.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run. The author reports a separate headless SDL2 experiment; the Rust checks, game runs and CI remain pending.
Overlaps and merge order: Not checked; network access is unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -1279,6 +1400,7 @@ pub fn gather(i.xdg_data_home = var(env, "XDG_DATA_HOME").map(PathBuf::from).or_else(|| under_home(".local/share"));i.xdg_config_home = var(env, "XDG_CONFIG_HOME").map(PathBuf::from).or_else(|| under_home(".config"));i.xdg_runtime_dir = var(env, "XDG_RUNTIME_DIR").map(PathBuf::from);i.title_bar_dir = libdecor_dir(env).filter(|d| own_folder(d));L7 (blocking): Checking only the final directory does not prevent a symlinked parent from redirecting the new read rule.
When: If the data directory's longshot component is a symlink to another location containing a real libdecor directory, own_folder accepts that final directory and rules grants the game read access to its unrelated contents.
Do: Validate or securely resolve the path components before granting the rule, and reject redirected paths outside the intended data directory.
Tests at
026fe6e6(Linux): the new test fails on the test commit for the bug's reason (no plugin folder) and passes with the fix; build-core: 221 passed, 0 failed, 1 ignored. Clippy not run locally (not installed on that PC); CI runs it. Still no game run.L3 and L7 addressed at
935397f4(old head026fe6e6).unsafe: libdecor's folder now comes fromldconfig -p(64-bit entries), then the listed folders. A system whose loader list does not name it (NixOS) and keeps the plugin elsewhere gets no title bar, on purpose: GTK would abort.holds_only_ours). A symlinked parent therefore shows the game no file of anyone else's, and a symlinked data folder still works.Linux:
build-core222 passed, 0 failed, 1 ignored. Clippy left to CI.026fe6e668935397f47b@review
Recommendation: Request changes. The new read rule can still be redirected to a player's directory through a symlinked parent. The affected game and desktop paths also still need the requested runs.
The builder selects libdecor's Cairo plugin for sandboxed games, aiming to prevent GTK from aborting while retaining window decorations. The approach avoids the previous unsafe code, but the directory check does not safely bound the new read grant.
Blocking (1): must change before merging.
builder/crates/build-core/src/sandbox_linux.rs:1403: Checking only the final directory does not prevent a symlinked parent from redirecting the new read rule. When: If the data directory's longshot component is a symlink to another location containing a real libdecor directory, own_folder accepts that final directory and rules grants the game read access to its unrelated contents. Do: Validate or securely resolve the path components before granting the rule, and reject redirected paths outside the intended data directory.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-core/src/sys.rs:212: The changed launch path has not been exercised in the game on the affected desktop or the other Wayland paths it changes. When: The reported SDL2 experiment omitted Landlock and did not execute this builder code, so it cannot show that the game loads the plugin and retains usable decorations. Do: Run the game on the reported GNOME/glycin setup and check startup, moving, resizing and closing; also check windowed launches on KDE and sway.@fixcan do L7.Since the last review (on
026fe6e668)Resolved: L3 (The new unsafe allowance is outside the locations permitted by the builder's documented Ru…)
Still open: L6 (The changed launch path has not been exercised in the game on the affected desktop or the…); L7 (Checking only the final directory does not prevent a symlinked parent from redirecting the…)
Checks: Still running: 11 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven in the game: the author reports a headless SDL2 window survived with Cairo and reproduced the abort with the normal plugin folder, but has not run the game on an affected desktop.
Other systems: The Linux launch path changes for sandboxed games on GNOME, KDE and sway, including systems without Landlock; game runs on those desktops remain outstanding. Windows does not compile this Linux-only path.
Switches: No switches added or changed. HOS_SANDBOX=0 and an existing LIBDECOR_PLUGIN_DIR are left alone.
Reviewed:
935397f47bagainst76092c5e5a: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the diff and commits, the changed launch and sandbox code, and the sandbox documentation; the large source and documentation output was partly skimmed. docs/review-checklist.md is absent, and the referenced sibling Tooling checkout is unavailable.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run. The author reports 222 build-core tests passed on Linux and a game-free SDL2 demonstration; CI is still running.
Overlaps and merge order: Unknown; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
935397f47b5f4c4d5329L7 addressed at
5f4c4d53(old head935397f4): the plugin folder is now ~/.local/share/longshot-libdecor, directly in the data folder, so there is no folder between that could be a link redirecting the read rule. The leaf itself must still be a real folder holding only the builder's links, which also covers the note about an unrelated libdecor-cairo.so link. build-core on Linux: 222 passed, 0 failed, 1 ignored. L6 (a game run) is still open.@review
Recommendation: Request changes. The title-bar folder can still be redirected through a symlinked parent, exposing files subsequently placed there to the sandboxed game. The game also still needs testing on the affected Wayland desktops.
The builder selects libdecor’s Cairo plugin for sandboxed games, aiming to prevent GTK’s icon loader from aborting on GNOME while retaining a title bar. It adds startup filesystem work and a read rule; the parent-path check remains incomplete.
Blocking (2): must change before merging.
builder/crates/build-core/src/sandbox_linux.rs:1403: Checking only the final directory does not prevent a symlinked parent from redirecting the new read rule. When: If the data directory's longshot component is a symlink to another location containing a real libdecor directory, own_folder accepts that final directory and rules grants the game read access to its unrelated contents. Do: Validate or securely resolve the path components before granting the rule, and reject redirected paths outside the intended data directory.@​fixor@​rebasetry first). (for the author)Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-core/src/sys.rs:212: The changed launch path has not been exercised in the game on the affected desktop or the other Wayland paths it changes. When: The reported SDL2 experiment omitted Landlock and did not execute this builder code, so it cannot show that the game loads the plugin and retains usable decorations. Do: Run the game on the reported GNOME/glycin setup and check startup, moving, resizing and closing; also check windowed launches on KDE and sway.@fixcan do L7.Since the last review (on
935397f47b)Still open: L6 (The changed launch path has not been exercised in the game on the affected desktop or the…); L7 (Checking only the final directory does not prevent a symlinked parent from redirecting the…)
New: L8 (It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first).)Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: a headless SDL2 window survived with the Cairo plugin alone, but the changed launch path has not been tested in the game on GNOME Wayland.
Other systems: The selection also affects KDE Wayland and sway; neither has been tested in the game. Windows does not run the Linux-only path. Systems without a discovered Cairo plugin can lose client-side decorations.
Switches: No switches added or changed. Existing HOS_SANDBOX=0 and a user-provided LIBDECOR_PLUGIN_DIR are left alone.
Reviewed:
5f4c4d5329against76092c5e5a: Read the full PR diff, commit list, changes since the ledger head, AGENTS.md, CONTRIBUTING.md and the pull request template. Inspected the changed sandbox and launch-path excerpts and tests; the full changed code files and their surrounding callers were not read in full.; nothing run (a code review).Checked and fine:
Testing: The author reports 222 build-core tests passed and a headless sway SDL2 reproduction and workaround; no game run has been reported. CI is still running. No commands from the project were run for this review.
Overlaps and merge order: Unknown; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
5f4c4d53294abfe890a9Rebased on main and pushed as
4abfe890(old head5f4c4d53).FS_READ_DIR), no right to read any file in it. The plugin is a link into the system's folders, read by their own rule. So wherever a link above the folder leads, and whatever is put there later, no file in it is opened up by this rule. A new test checks that, and the confined-run test now reads the plugin through the link.Linux, rebased: the new test fails on the test commit; with the fix
build-core224 passed, 0 failed, 1 ignored, three runs. One earlier run failedlock::tests::one_copy_per_profile_among_threads_and_other_profiles_at_once(a file this PR does not touch); it passed in the three that followed, and in three on plain main.@review
Recommendation: Approve. The code is ready: only testing is left. The listing-only rule addresses the redirected-directory read exposure, and the branch is rebased on the supplied base. The game launch path still needs to be exercised on GNOME, KDE and sway before the fix is ready to merge. Recommend approval; not approved on the forge.
Sandboxed games select libdecor’s Cairo plugin to avoid GTK’s loader abort while retaining a plain title bar where Cairo is available. The cost is a different-looking title bar and, on systems where the plugin cannot be found, no title bar.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
builder/crates/build-core/src/sys.rs:212: The changed launch path has not been exercised in the game on the affected desktop or the other Wayland paths it changes. When: The reported SDL2 experiment omitted Landlock and did not execute this builder code, so it cannot show that the game loads the plugin and retains usable decorations. Do: Run the game on the reported GNOME/glycin setup and check startup, moving, resizing and closing; also check windowed launches on KDE and sway.Since the last review (on
5f4c4d5329)Resolved: L7 (Checking only the final directory does not prevent a symlinked parent from redirecting the…); L8 (It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first).)Still open: L6 (The changed launch path has not been exercised in the game on the affected desktop or the…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven in the game. The author reports that a headless SDL2 window survives with the Cairo-only folder where the GTK plugin aborts, and that the game-free test fails before the fix and passes after it.
Other systems: The launch path changes sandboxed Linux games on GNOME, KDE and sway; none has had a game run reported. Windows is unaffected by the Linux-only path. The plugin must remain readable through an existing system rule.
Switches: No switch added or changed. Existing HOS_SANDBOX defaults to off; an existing LIBDECOR_PLUGIN_DIR is preserved.
Reviewed:
4abfe890a9against0a68a1dea8: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full PR diff, the prior diff and commit list; inspected the changed sandbox and launch paths and tests. The sandbox source output was truncated, so the entire file was not read; recorded runs and documentation were skimmed.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run the project were executed. The author reports 224 build-core tests passed, one ignored, and a headless SDL2 reproduction; CI is still running.
Overlaps and merge order: None found in the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
WIP: fix(sandbox): the title bar on GNOME is libdecor's Cairo plugin, so GTK no longer aborts the gameto fix(sandbox): the title bar on GNOME is libdecor's Cairo plugin, so GTK no longer aborts the game