feat: add native WSL (Ubuntu) support#9
Closed
dhruvkej9 wants to merge 1 commit intoFinesssee:mainfrom
Closed
Conversation
Add full WSL/Linux support so CodexBar runs natively inside Windows Subsystem for Linux, following the same pattern as the official OpenAI Codex CLI's WSL integration. Changes: - Add WSL environment detection module (wsl.rs) with distro/user resolution - Add WSL-aware browser path resolution via /mnt/c/ (wsl_paths.rs) - Update browser detection to find Windows browsers from WSL - Add informative DPAPI error messages for WSL cookie extraction - Add Linux notification support via notify-send with PowerShell fallback - Move winreg to Windows-only dependencies (compilation fix) - Add dev.sh build script for Linux/WSL with auto CLI fallback - Update README with WSL setup docs and auth tips WSL users can: - Run CLI commands: codexbar usage -p <provider> - Use GUI with WSLg (Windows 11) - Extract cookies manually (Settings → Cookies) - Authenticate providers natively (codex login, claude login) DPAPI-encrypted Chromium cookies cannot be auto-extracted in WSL; manual cookies or CLI-based auth are recommended instead. Co-Authored-By: OpenClaw <openclaw@openclaw.ai>
Owner
|
Hey thanks for the pull request, I will check on this rn |
Finesssee
added a commit
that referenced
this pull request
Mar 24, 2026
Port WSL detection, browser path resolution, and cross-platform notifications from PR #9, with the following fixes over the original: - Move cross-platform deps (rusqlite, aes-gcm, keyring, dirs, etc.) from cfg(windows) to shared [dependencies] so native Linux builds work - Fix dev.sh to use --target from rustc host instead of relying on .cargo/config.toml (which defaults to x86_64-pc-windows-msvc) - Use cfg_attr(windows, windows_subsystem) instead of separate attrs - Fix Gemini auth hint in README (was incorrectly showing claude-code) - Remove dead WslBrowserDetector::should_use() method - Remove WSL PowerShell MessageBox fallback (blocking modal, bad UX) - Fix clippy collapsible-if in wsl.rs New modules: wsl.rs, browser/wsl_paths.rs Modified: main.rs, notifications.rs, browser/{mod,detection,cookies}.rs, Cargo.toml, README.md New script: dev.sh (Linux/WSL build + run) Made-with: Cursor
Owner
|
Thanks for this PR! We've ported the WSL support changes into main (commit ebb760a) with the following additional fixes:
All 181 tests pass on Linux, Windows cross-compile verified. Closing this PR since the changes are now on main. Thanks again! |
Author
Can it now run inside windows and detect WSL and fetch data from there and show in the windows GUI itself? Because nobody likes the WSL GUI. |
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.
Summary
Adds native WSL/Linux support so CodexBar runs inside Windows Subsystem for Linux — following the same pattern as the OpenAI Codex CLI's WSL integration.
What's new
WSL Environment Detection (
rust/src/wsl.rs)/proc/version,WSL_DISTRO_NAMEenv, and/run/WSL/mnt/c/Users/C:\Users\...) to WSL paths (/mnt/c/Users/...)WSL-Aware Browser Detection (
rust/src/browser/wsl_paths.rs)/mnt/c/Users/<user>/AppData/Local/...Cookie Extraction for WSL
Linux Notifications
notify-sendfor native desktop notificationspowershell.exein WSLBuild & Dev Experience
dev.sh— Linux/WSL build script with auto-detection and CLI fallbackwinregmoved to Windows-only dependency (fixes Linux compilation)WSL Auth Quick Reference
npm i -g @openai/codex→codex login(inside WSL)npm i -g @anthropic-ai/claude-code→claude login(inside WSL)Files changed
Testing
#[cfg(windows)])/proc/versionparsing/mnt/c/mappingnotify-sendon LinuxHow it mirrors Codex's WSL approach
The OpenAI Codex docs recommend:
wsl --install~/code/for best performanceCodexBar follows the same pattern: the CLI works natively in WSL, provider CLIs (
codex,claude) authenticate inside the Linux environment, and the GUI works via WSLg when available.