Description
On Linux, arboard::Clipboard::new() opens a blocking connect() to the X11 Unix socket (/tmp/.X11-unix/X0). When
no X server is running (headless, WSL2 without WSLg), the call hangs indefinitely. Because raw mode and the alternate
screen are already active at that point, Ctrl+C no longer generates SIGINT and the event loop hasn't started yet —
leaving the user with a blank screen and no way to exit.
Steps to reproduce
- Run WSL2 without WSLg (or any headless Linux without X server)
- Run
deepseek-tui
- Observe the TUI never appears — blank alt-screen, unresponsive to Ctrl+C
Expected behavior
TUI starts normally, shows onboarding or chat interface. If clipboard is unavailable, it should gracefully fall back
to OSC 52 / pbcopy / PowerShell paths.
Actual behavior
Process hangs on connect(/tmp/.X11-unix/X0) with a blank alternate screen. Ctrl+C doesn't work because raw mode
suppresses SIGINT and the event loop hasn't started yet. The only way out is pkill -9 from another terminal.
Impact
100% reproducible on any Linux system without an X server. Blocks all WSL2 users who haven't installed WSLg or a
third-party X server.
Environment
- OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- DeepSeek CLI version: 0.8.39 (eeccf7d)
- Install method: source build
- Model/provider: N/A (startup issue, never reaches model selection)
- Terminal app: Windows Terminal
- Shell: zsh
Logs, screenshots, or recordings
strace shows the process blocked on:
connect(5, {sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X0"}, 20)
Description
On Linux,
arboard::Clipboard::new()opens a blockingconnect()to the X11 Unix socket (/tmp/.X11-unix/X0). Whenno X server is running (headless, WSL2 without WSLg), the call hangs indefinitely. Because raw mode and the alternate
screen are already active at that point, Ctrl+C no longer generates SIGINT and the event loop hasn't started yet —
leaving the user with a blank screen and no way to exit.
Steps to reproduce
deepseek-tuiExpected behavior
TUI starts normally, shows onboarding or chat interface. If clipboard is unavailable, it should gracefully fall back
to OSC 52 / pbcopy / PowerShell paths.
Actual behavior
Process hangs on
connect(/tmp/.X11-unix/X0)with a blank alternate screen. Ctrl+C doesn't work because raw modesuppresses SIGINT and the event loop hasn't started yet. The only way out is
pkill -9from another terminal.Impact
100% reproducible on any Linux system without an X server. Blocks all WSL2 users who haven't installed WSLg or a
third-party X server.
Environment
Logs, screenshots, or recordings
straceshows the process blocked on:connect(5, {sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X0"}, 20)