Skip to content

🤖 Fix fleetd escrow in X11 multi-user sessions - #39795

Merged
lucasmrod merged 10 commits into
mainfrom
34501-fix-fleetd-escrow-multi-sessions-x11
Feb 16, 2026
Merged

🤖 Fix fleetd escrow in X11 multi-user sessions#39795
lucasmrod merged 10 commits into
mainfrom
34501-fix-fleetd-escrow-multi-sessions-x11

Conversation

@lucasmrod

@lucasmrod lucasmrod commented Feb 12, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #31633.

Main change is stop relying on who command output to get the value of the DISPLAY variable on X11 sessions (old distributions), and instead search the value of the DISPLAY variable in processes that are owned by the target user.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.

Testing

  • QA'd all new/changed functionality manually

fleetd/orbit/Fleet Desktop

  • Verified compatibility with the latest released version of Fleet (see Must rule)
  • If the change applies to only one platform, confirmed that runtime.GOOS is used as needed to isolate changes
  • Verified that fleetd runs on macOS, Linux and Windows
  • Verified auto-update works from the released version of component to the new version (see tools/tuf/test)

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced X11 session detection for improved support in multi-session environments, providing more reliable display variable identification in complex session configurations.

@lucasmrod

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request modifies the X11 display detection mechanism in the Linux user execution module. It refactors the getDisplayVariableForSession function by removing the user parameter and changing the implementation from using the system who command to a procfs-based approach. The new implementation reads DISPLAY environment variables directly from /proc filesystem entries. Helper functions are introduced to read environment variables from /proc files. Legacy code that parsed who command output is removed. Tests are updated to validate the new procfs-based environment reading functionality, including error handling for missing environ files.

🚥 Pre-merge checks | ✅ 4 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description is largely incomplete compared to the template requirements. Most testing and verification checkboxes are either unchecked or missing details. Add details for: automated tests (added/updated), SQL validation if applicable, load testing confirmation for bug fixes, and complete all remaining verification checkboxes for fleetd/orbit/Fleet Desktop changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix fleetd escrow in X11 multi-user sessions' clearly summarizes the main change, addressing the primary objective of fixing the disk encryption popup issue in multi-user X11 environments.
Linked Issues check ✅ Passed The code changes directly address the linked issue #31633 by improving DISPLAY variable detection in X11 multi-user sessions through procfs-based discovery instead of external 'who' command execution.
Out of Scope Changes check ✅ Passed All changes are focused on improving X11 display detection for multi-user sessions. The refactoring of display retrieval logic, transition from 'who' command to procfs-based approach, and corresponding test updates are all directly aligned with fixing the disk encryption popup issue.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into 34501-fix-fleet-desktop-gui-sessions

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 34501-fix-fleetd-escrow-multi-sessions-x11

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.

@codecov

codecov Bot commented Feb 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.68421% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.27%. Comparing base (0823cc7) to head (81c7512).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
orbit/pkg/execuser/execuser_linux.go 23.68% 29 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #39795   +/-   ##
=======================================
  Coverage   66.27%   66.27%           
=======================================
  Files        2439     2439           
  Lines      195442   195409   -33     
  Branches     8551     8591   +40     
=======================================
- Hits       129528   129510   -18     
+ Misses      54179    54170    -9     
+ Partials    11735    11729    -6     
Flag Coverage Δ
backend 68.07% <23.68%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread orbit/pkg/execuser/execuser_linux.go
juan-fdz-hawa
juan-fdz-hawa previously approved these changes Feb 16, 2026
Base automatically changed from 34501-fix-fleet-desktop-gui-sessions to main February 16, 2026 14:41
@lucasmrod
lucasmrod dismissed juan-fdz-hawa’s stale review February 16, 2026 14:41

The base branch was changed.

@lucasmrod
lucasmrod merged commit 34313b2 into main Feb 16, 2026
59 checks passed
@lucasmrod
lucasmrod deleted the 34501-fix-fleetd-escrow-multi-sessions-x11 branch February 16, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux disk encryption: Popup doesn't open on Linux workstations w/ multiple users

2 participants