Repository navigation
server: set no Wayland or toolkit variables without a compositor - #143
Merged
jsegaran merged 1 commit intoNov 4, 2026
Merged
Conversation
Off Linux the compositor is a stub whose socket name is empty, but PTY and
session-env spawns still passed Some("") to session_env, which exported an
empty WAYLAND_DISPLAY and pinned Qt, GTK, SDL, Electron and Firefox to
Wayland. On macOS a Qt app then aborts: "Could not find the Qt platform
plugin wayland ... Available platform plugins are: cocoa".
indent
Bot
force-pushed
the
fix/session-env-without-compositor
branch
from
November 4, 2026 09:55
243cb9f to
9229ae6
Compare
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.
On macOS (and any non-Linux host) every PTY gets
WAYLAND_DISPLAY=and the Wayland toolkit pins:QT_QPA_PLATFORM=wayland,GDK_BACKEND=wayland,SDL_VIDEODRIVER=wayland,XDG_SESSION_TYPE=wayland,ELECTRON_OZONE_PLATFORM_HINT=wayland,MOZ_ENABLE_WAYLAND=1,NIXOS_OZONE_WL=1. A Qt app then aborts with "Could not find the Qt platform plugin "wayland" ... Available platform plugins are: cocoa". We hit it with the Android emulator in windowed mode.Off Linux,
spawn_compositoris a stub whosesocket_nameis empty, but the PTY spawns andprepare_session_envstill passSome("")toapp_env::session_env, andsession_envonly checkedif let Some(wd). It now treats an empty socket name as no display. Linux is unchanged: a real compositor always has a non-empty socket path.an_empty_socket_name_sets_no_display_variablescovers it.cargo test -p yas-server --lib app_envandcargo fmt -- --checkpass on this branch, andcargo clippy -p yas-server --all-targets -- -D warningspassed on the same change against the fork. The identical test fails without the fix (checked in blit, which has the same code).Tag
@indentto continue the conversation here.