Skip to content

fix: Add Linux ozone platform switch for improved compatibility#3159

Merged
jeanfbrito merged 3 commits intomasterfrom
fix-x11-support
Dec 11, 2025
Merged

fix: Add Linux ozone platform switch for improved compatibility#3159
jeanfbrito merged 3 commits intomasterfrom
fix-x11-support

Conversation

@jeanfbrito
Copy link
Copy Markdown
Member

@jeanfbrito jeanfbrito commented Dec 8, 2025

  • Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

We will be forcing X11 for now until we get a stable Wayland support. This was happening already on older versions of Electron.

Closes #3154

Summary by CodeRabbit

  • Bug Fixes

    • Improved Linux startup and rendering compatibility to reduce platform-specific display issues.
    • Updated Linux packaging/runtime settings to ensure consistent behavior at app launch.
  • Chores

    • Project version bumped to 4.10.1 for release tracking.

✏️ Tip: You can customize this high-level summary in your review settings.

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

Adds a Linux-only Chromium startup flag (ozone-platform=x11) at app initialization, adds executableArgs: ["--ozone-platform=x11"] to the Snap build config, and bumps package version from 4.10.0 to 4.10.1. No other control-flow changes.

Changes

Cohort / File(s) Summary
Linux Chromium configuration
src/app/main/app.ts, electron-builder.json
src/app/main/app.ts: on Linux, appends Chromium switch ozone-platform = x11 via app.commandLine.appendSwitch during startup. electron-builder.json: adds executableArgs: ["--ozone-platform=x11"] under linux.snap.
Version bump
package.json
Increments project version from 4.10.0 to 4.10.1. No functional changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check app.commandLine.appendSwitch is invoked before any Chromium/Electron initialization that depends on ozone.
  • Verify electron-builder.json placement and JSON schema for executableArgs in the linux.snap section.
  • Confirm package version bump aligns with release metadata (changelog/release pipeline).

"I twitch my nose and tap the key,
On Linux I flip ozone to X11,
A small hop, a gentler start,
Screens awake and errors part. 🐇"

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adding a Linux ozone platform switch (x11) for improved compatibility, which matches the PR's core objective.
Linked Issues check ✅ Passed The PR adds Linux x11 ozone platform switch via app startup logic and Snap configuration to address Wayland initialization failures reported in issue #3154.
Out of Scope Changes check ✅ Passed All changes (app startup flag, version bump, and Snap executable args) are directly scoped to fixing Linux Wayland compatibility issues; no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-x11-support

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 help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3b1c7c3 and d7a20cf.

📒 Files selected for processing (1)
  • src/app/main/app.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow existing TypeScript patterns with strict mode enabled
All new code must pass ESLint and TypeScript checks
Avoid unnecessary comments; only add comments for complex logic or non-obvious decisions

Files:

  • src/app/main/app.ts
🧠 Learnings (2)
📚 Learning: 2025-09-26T19:24:21.364Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-26T19:24:21.364Z
Learning: Applies to src/rootWindow.ts : Keep `src/rootWindow.ts` as the renderer entry for the main window UI

Applied to files:

  • src/app/main/app.ts
📚 Learning: 2025-09-26T19:24:21.364Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-26T19:24:21.364Z
Learning: Applies to src/main.ts : Keep `src/main.ts` as the Electron main process entry point compiled by Rollup

Applied to files:

  • src/app/main/app.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: check (ubuntu-latest)
  • GitHub Check: check (macos-latest)
  • GitHub Check: check (windows-latest)
  • GitHub Check: build (ubuntu-latest, linux)
  • GitHub Check: build (macos-latest, mac)
  • GitHub Check: build (windows-latest, windows)

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 8, 2025

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 8, 2025

Windows installer download

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 8, 2025

macOS installer download

@jeanfbrito jeanfbrito merged commit 6298e8c into master Dec 11, 2025
11 checks passed
@jeanfbrito jeanfbrito deleted the fix-x11-support branch December 11, 2025 16:28
sreeja2007 pushed a commit to sreeja2007/Rocket.Chat.Electron that referenced this pull request Mar 2, 2026
* fix: Add Linux ozone platform switch for improved compatibility

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

* chore: Bump version to 4.10.1 in package.json

* fix: Add executable arguments for Linux ozone platform compatibility

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
Ram-sah19 pushed a commit to Ram-sah19/Rocket.Chat.Electron that referenced this pull request Mar 10, 2026
* fix: Add Linux ozone platform switch for improved compatibility

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

* chore: Bump version to 4.10.1 in package.json

* fix: Add executable arguments for Linux ozone platform compatibility

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
Ram-sah19 pushed a commit to Ram-sah19/Rocket.Chat.Electron that referenced this pull request Mar 10, 2026
* fix: Add Linux ozone platform switch for improved compatibility

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

* chore: Bump version to 4.10.1 in package.json

* fix: Add executable arguments for Linux ozone platform compatibility

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
Ram-sah19 pushed a commit to Ram-sah19/Rocket.Chat.Electron that referenced this pull request Mar 10, 2026
* fix: Add Linux ozone platform switch for improved compatibility

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

* chore: Bump version to 4.10.1 in package.json

* fix: Add executable arguments for Linux ozone platform compatibility

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
Ram-sah19 pushed a commit to Ram-sah19/Rocket.Chat.Electron that referenced this pull request Mar 10, 2026
* fix: Add Linux ozone platform switch for improved compatibility

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

* chore: Bump version to 4.10.1 in package.json

* fix: Add executable arguments for Linux ozone platform compatibility

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
Ram-sah19 pushed a commit to Ram-sah19/Rocket.Chat.Electron that referenced this pull request Mar 10, 2026
* fix: Add Linux ozone platform switch for improved compatibility

- Introduced a command line switch for Linux to set the ozone platform to 'x11', enhancing compatibility with specific environments during Electron startup.

* chore: Bump version to 4.10.1 in package.json

* fix: Add executable arguments for Linux ozone platform compatibility

- Included the `--ozone-platform=x11` argument in the Electron builder configuration to enhance compatibility with specific Linux environments during application startup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash after update snap to 4.10.0

1 participant