Skip to content

Restart WSL to re-enable WSLg display for running the GUI #1

Description

@anopheles

The app was ported from Python 2 + PyQt4 to Python 3 + PyQt5 and verified to run correctly headless (offscreen Qt platform + screenshot of the rendered Lobby window). It's not yet been seen running on an actual display in this WSL environment.

Blocker

$DISPLAY is empty and WSLg isn't wired up in the current WSL session — no working X11/Wayland socket, and /mnt/wslg/run/user/1000 is present but inaccessible/empty. Running python3 instantsoupmain.pyw fails with:

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

Fix (do this on the Windows side, not inside WSL)

  1. In PowerShell/CMD on Windows: wsl --shutdown
  2. Reopen the WSL terminal.
  3. Verify echo $DISPLAY shows something like :0.
  4. Run:
    cd ~/dev/InstantSOUP/src && python3 instantsoupmain.pyw
    

If WSLg still doesn't come up after the restart (e.g. older Windows without WSLg support), fall back to installing an X server on Windows (VcXsrv or X410), launching it, and setting DISPLAY manually, e.g.:

export DISPLAY=$(ip route show default | awk '{print $3}'):0

Also needed once (already done in this session, but noting for a fresh machine)

sudo apt-get install -y libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxkbcommon-x11-0
pip install PyQt5 "construct==2.5.3"

Activity

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