Repository navigation
Share a wlroots session's real screen (851-4500) - #1507
Merged
pondorasti merged 4 commits intoNov 27, 2026
Merged
Conversation
The Screen display now also shares the account's Sway, Hyprland or other wlroots session, through wayvnc on the same private socket and relay as the X11 screen. GNOME and KDE on Wayland are still refused in one sentence. wayvnc rather than w0vncserver: w0vncserver goes through the desktop portal, which asks the person at the screen, and exits without it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review fixes: an app started for XWayland alone no longer makes a Sway session look unshareable; without logind a compositor counts only when it started the session's process; the helper is recognised only by its socket flag; installing refuses a GNOME or KDE Wayland session; the CLI shows a Wayland display given as a path; the README says wlroots shares one output and that Debian 12's wayvnc has no control socket. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… its display (851-4500) Second review of #1507: - With nobody at the screen, the helpers wanted are those for the kinds of session the machine offers (X11 sessions or Xorg; an installed wlroots compositor), and installs are exactly the missing programs, so a Sway machine never gets or is refused over x0vncserver. - Wayland processes go first only when logind says Wayland, and before the preference for the session bus. - A Wayland session is wlroots when the compositor behind the chosen process's WAYLAND_DISPLAY is one, found by walking up its parents, so a nested Sway doesn't mark GNOME as wlroots, and /proc isn't scanned. - A wayvnc without --unix-socket (Ubuntu 22.04's 0.4.1) is named as too old instead of being started. - A refused Wayland session reports nothing missing, asks no sudo, and keeps its display; wayvnc --help runs only when wlroots needs it; the CLI's session names are a Map. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e by its version (851-4500) Code review of the second-round fixes: - The compositor of a Wayland display is the process of the account that holds `<runtime dir>/<WAYLAND_DISPLAY>.lock` open, not a parent of the chosen app: labwc and river detach their apps, and a parent whose environment can't be read no longer ends the search. A display whose compositor was started inside another Wayland display is nested and left out, so a Sway window in GNOME is never shared. Found compositors are remembered while they run. - wayvnc is too old only when --version names a version below 0.5; a failing --help or --version no longer blocks sharing. - With nobody at the screen, an old wayvnc refuses setup only when no other kind the machine offers can be shared. - Checking the programs again also checks the machine's session kinds. Co-Authored-By: Claude Opus 5.5 <[email protected]>
pondorasti
deleted the
alexandru/851-4500-linux-desktop-step-8b-share-a-wlroots
branch
November 27, 2026 06:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: 851-4500, step 8b of the Linux desktop (851-4479).
What changes
sway,Hyprland,river,labwc,wayfire), with the same rules as the X11 screen: a private socket (codevisor-screen-<hex>.sock, mode 0600, no TCP port), the same relay, only the account at the screen, never the login screen, the viewing notification, and no prompt at the machine.wayvnc, run with--config=/dev/null(a user config can't add a TCP port or a password),--render-cursor, underumask 077, with its control socket next to the VNC socket when the installed wayvnc has one.setup --screeninstalls exactly the programs that are missing (apt, dnf, pacman, zypper). For a session at the screen, that means its own helper. With nobody at the screen, it means the helpers for every kind of session the machine offers, so a Sway-only machine getswayvncand neverx0vncserver.$XDG_RUNTIME_DIR/<WAYLAND_DISPLAY>.lock). Wayland processes go first only when logind says Wayland, and that filter runs before the session-bus preference. A nested display (its compositor started inside another Wayland display) is left out.wayvncolder than 0.5 by--version(Ubuntu 22.04's 0.4.1, which has no--unix-socket) isn't started. It's named as too old instead.Why wayvnc and not w0vncserver
TigerVNC 1.16's
w0vncservershares through the desktop portal's RemoteDesktop and ScreenCast interfaces, which ask the person at the screen. In a Fedora container, w0vncserver 1.16.2 exited without a session bus, and also exited on a bus without the portal. wayvnc uses wlroots' own protocols and never prompts. So wayvnc is used, even when both are installed.Proof
Type=wayland):setup --screeninstalled onlywayvnc;x0vncserverstayed absent.SWAYSOCK, and the server still called the session wlroots: Sway heldwayland-1.lock.swaymsg exitwith a viewer connected: the relay closed, the helper and socket were gone, and only Desktop was offered.--unix-socket. Checked in a container.Not done
🤖 Generated with Claude Code