Skip to content

fix(elevation): disable renderer sandbox when running as root on Linux#107

Merged
dbfx merged 1 commit intomainfrom
fix/linux-admin-relaunch-grey-screen
Mar 29, 2026
Merged

fix(elevation): disable renderer sandbox when running as root on Linux#107
dbfx merged 1 commit intomainfrom
fix/linux-admin-relaunch-grey-screen

Conversation

@dbfx
Copy link
Copy Markdown
Contributor

@dbfx dbfx commented Mar 29, 2026

Summary

  • Fixes grey/blank screen after "Relaunch as Admin" on Linux (e.g. Linux Mint)
  • The --no-sandbox CLI switch only disables the browser/GPU process sandbox — the per-renderer sandbox: true in BrowserWindow.webPreferences is a separate setting that also needs to be disabled when running as root
  • Extracts root detection into a module-level isRoot const and uses sandbox: !isRoot so the renderer sandbox is only disabled when running as root via pkexec

Test plan

  • On Linux Mint (or similar), click "Relaunch as Admin" and verify the app renders correctly after elevation
  • On Linux as a normal user, verify the app still launches with renderer sandbox enabled
  • On Windows, verify no behavior change (UAC elevation still works)
  • On macOS, verify no behavior change

🤖 Generated with Claude Code

The --no-sandbox command-line switch only disables the browser/GPU
process sandbox, not the per-renderer sandbox set via webPreferences.
When relaunched as root via pkexec, Chromium's renderer sandbox fails
silently (Linux namespaces don't work under root), leaving a grey
window with no content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@dbfx dbfx merged commit b7329d4 into main Mar 29, 2026
8 checks passed
@dbfx dbfx deleted the fix/linux-admin-relaunch-grey-screen branch March 29, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant