Skip to content

stoa-env: XDG_CURRENT_DESKTOP fallback follows the chosen compositor - #202

Merged
VictorGSchneider merged 1 commit into
mainfrom
claude/dreamy-ramanujan-bslkau
Oct 20, 2026
Merged

VictorGSchneider merged 1 commit into
mainfrom
claude/dreamy-ramanujan-bslkau

Conversation

@VictorGSchneider

Copy link
Copy Markdown
Owner

Summary

  • shell/stoa-env.sh exported XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-Hyprland}". The fallback only fires outside a session, but that includes the tty1 login shell that autostart hands to niri-session, so niri machines advertised Hyprland there. That can steer xdg-desktop-portal (screen sharing, file pickers) to the wrong backend.
  • The fallback now reads ~/.config/stoa/wm (written by post-install.sh / stoa-wm set). Without that file it picks the installed compositor, Hyprland first. This is the same pick stoa-autostart-hyprland.sh makes. A value the session already set is never touched.
  • New W8 checks in tests/test_stoa_wm.sh: a session value is kept, the file is honoured, the file beats installed binaries, and the binary fallback works. Three of them fail against the old line.

Test plan

  • tests/run.sh --strict: 18 passed
  • On a niri machine: open a TTY (no session), run echo $XDG_CURRENT_DESKTOP and expect niri

Generated by Claude Code

The fallback was hard-coded to "Hyprland". It only applies to shells
started outside a session, but that includes the tty1 login that
autostart hands to niri-session, so a niri machine advertised Hyprland
there (and in anything launched from a TTY), which can steer
xdg-desktop-portal to the wrong backend.

It now reads ~/.config/stoa/wm, else picks the installed compositor
(Hyprland first), the same pick as stoa-autostart-hyprland.sh. A value
set by the session is still never touched. Covered by W8 in
tests/test_stoa_wm.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LviacJW5Bp5ywJzNWy8AWM
@VictorGSchneider VictorGSchneider self-assigned this Oct 20, 2026
@VictorGSchneider
VictorGSchneider merged commit 1c2b2fd into main Oct 20, 2026
3 checks passed
@VictorGSchneider
VictorGSchneider deleted the claude/dreamy-ramanujan-bslkau branch October 20, 2026 23:38
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