Skip to content

fix(linux): select graphical login session - #390

Open
msegec wants to merge 1 commit into
Ylianst:masterfrom
msegec:fix/select-graphical-logind-session
Open

msegec wants to merge 1 commit into
Ylianst:masterfrom
msegec:fix/select-graphical-logind-session

Conversation

@msegec

@msegec msegec commented Aug 24, 2026

Copy link
Copy Markdown

Problem

A Linux user can have multiple active logind sessions. The user-manager session may appear first with an empty Display, causing MeshAgent to pass no display to the remote desktop path even when the active seat is X11 on :0.

Fix

Skip active sessions without a display and continue to the active graphical session.

Verification

  • Reproduced on Arch Linux ARM with active manager and seat sessions
  • Existing selector returned an empty display
  • Updated selector returned :0

Built with GPT-5.6-sol via Codex in T3 Code.

@si458

si458 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

you havent followed the pull request template because you edited a module which needs to be encoded in the polyfills.c file

Summary

In this pull request, the following changes are made:

  • Foobar was changed to FooFoo, because ...
  • Relates to #issue-number
  • Resolves #issue-number
Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • 🧠 I used LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🛠️ I have self-reviewed my code and self-tested it against a MeshCentral server to ensure it works as expected.
  • 🖥️ My change compiles on every platform it affects (Windows / Linux / macOS / FreeBSD), and I have considered
    the impact on platforms and architectures I could not test.
  • 📦 If I changed JavaScript modules under modules/, I re-embedded them so the compiled-in copies in
    microscript/ILibDuktape_Polyfills.c match (the agent runs the embedded copies, not the files on disk).
  • 🤖 I ran the agent self-test where appropriate (see "Self Test" in readme.md).
  • 📄 Documentation updates are included (if applicable), e.g. the .msh options table in readme.md.
  • 🧰 Updates to vendored dependencies (OpenSSL, zlib, ...) are listed and explained.
  • ⚠️ CI passes and is green (Windows / Linux / macOS / FreeBSD builds and CodeQL).

Testing

Platform (OS / distro / arch) Tested Result
e.g. Windows 11 x64
e.g. Debian 13 x64 (Wayland)

Screenshots for Visual Changes

Event Before After
Before After

User manager sessions can be active without a display. Skip them so remote desktop receives the active X11 display.
@msegec
msegec force-pushed the fix/select-graphical-logind-session branch from ef6adfc to 55b0ea4 Compare August 24, 2026 12:55
@si458

si458 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@msegec plz can you fix the conflict?
you will need to merge latest commits we pulled in
then run the polyfill again as the modules/monitor-info.js has changed :)

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.

2 participants