8000 WSL Base Support for notification framework · Issue #60 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

WSL Base Support for notification framework #60

Closed

Description

@stlindenau

Currently the notification framework (in the sidebar) is not really working in wmux.
While it would be a bigger effort to get a seamless integration the following 2 things would already improve the situation a lot

  1. Ensure that WMUX variables are pushed through - the following environment variable worked on my side when set manually:
WSLENV="WMUX/u:WMUX_SURFACE_ID/u:WMUX_CLI/up:WMUX_PIPE/u"
  1. Translate WSL workspace path on session restore - currently an error is showing up if a WSL path like /home//.../ is put into the variable windows.workspaces.cwd in session.json - the following error is the result:
[failed to create PTY: Error: Error invoking remote method 'pty:create': Error: Failed to create terminal: Cannot create process, error code: 267]

These 2 fixes/enhancements would make working with WSL a lot easier.

Thanks in advance,
Stefan Lindenau

Activity

  1. added a commit that references this issue on Jun 26, 2026
  2. amirlehmam commented on Jun 26, 2026

    @amirlehmam
    Owner

    Fixed in v0.12.0 🎉 — thanks for the precise report and the WSLENV hint, Stefan, it made this straightforward.

    1. WMUX vars now propagate into WSL. wmux sets WSLENV automatically for WSL shells:

    WMUX/u:WMUX_SURFACE_ID/u:WMUX_CLI/up:WMUX_PIPE/u:WMUX_PIPE_TOKEN/u:WMUX_INTEGRATION/u
    

    (/up translates the WMUX_CLI Windows path to a /mnt/c/... mount; the rest pass through unchanged.) Any pre-existing WSLENV you set is preserved and appended to. So the sidebar/notification framework and the wmux CLI now work from inside WSL without manual setup.

    2. WSL cwd on session restore (error 267). A restored POSIX path like /home/<user>/... was being handed to a Win32 process as its working dir, which fails with ERROR_DIRECTORY (267). wmux now detects a POSIX cwd and instead opens it inside the distro via wsl --cd <path>, while the Win32 process starts in a valid Windows dir. So restoring a session with a WSL workspace folder no longer errors.

    Grab the v0.12.0 zip from the releases page (right-click → Unblock after download). Let me know if anything's still off on your setup!

  3. stlindenau commented on Jun 26, 2026

    @stlindenau
    ContributorAuthor

    @amirlehmam thanks for the quick reaction. The environment variables are working neatly.

    The directory is correctly reported in wmux and I can also see it in session.json - but on session recreation I cannot observe the behaviour that the changedir within WSL is not happening. My bash is opening up in my homefolder instead ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0