-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Warp for Linux on WSL (Windows Subsystem for Linux) #4240
Comments
@dannyneira I think you meant to link to this issue from your comment on #204, but made a typo (and accidentally linked to #424). |
@cj81499 thanks for catching that, fixed! |
Just to share, I've actually had success this morning just installing the linux Pretty much everything seems to be working really well, you just need to make sure you have Firefox installed to allow you to log in etc and I had to use the copy auth code method rather then being automatically logged in as the referral back to warp didn't function with wsl2 in the way. It's not a perfect experience as things like maximising the window don't really work and the start menu icon is just linux instead of indicating it is warp, but its already soooo much better then any other terminal experience so far 🙌 Kudos 🤜 p.s. I had happened to be trying Git Butler too and hence knowing to install Firefox etc. Some useful git-butler install instructions that ended up being helpful for warp! |
Works decently on wsl2, but I can't resize or move the window at all besides clicking the fullscreen button, and once I fullscreen the window, I can't change it back to windowed again. |
Hi @JonParton. I tried earlier to run on wsl2, but I keep running into this error when trying to launch Warp. Any insight on how to work around it? |
Same issue as @WilsonCazarre, this time on an NVIDIA GPU. Firefox works fine in GUI. Update: running it with the environment variable |
@Anidion I forgot to mention that I'm also using an NVIDIA GPU (GTX 1050) but I think WSL is not detecting that, I'm not sure why. |
I ended up with this command: On a side note, I know this isn't the same issue, but I've been trying all day to get it to launch in my Ubuntu 20.04 VM (VMWare Player), and it launched with that command. I had tried with X11 and Wayland, and after both didn't work, I switched back to Wayland. On a whim, I tried the environment variable, and Warp launched. |
I've also got it running using In the WSL terminal I can see that these events occur when I attempt to paste my auth token.
Any ideas on how to successfully login? |
same for me... in the console is throwing this message: Failed to parse AuthRedirectPayload from redirect URL: relative URL without a base |
Looks like there are a few of us with this issue now. I'm in the same boat. I tried copying and pasting only specific sections of the full token length, but nothing has worked so far. Seems the parsing instructions aren't aligning with what the auth link actually spits out. I'll see if I can find where the faulty instructions are, unless one of the devs beats me to it (or identifies another issue I'm not considering). |
I’m away from my computer atm but I saw a few threads in the Warp Discord channel about both people successfully running Warp in WSL and other ways to pass the auth token into Warp. Haven’t got anything working yet |
It's been awhile since I used warp because I don't use Linux. It is my favorite terminal though. WSL support isn't terribly important. WSL virtual memory is too slow for things like simple web servers. So there's not much I'd ever use it for. Definitely looking forward to the native windows support though. I'd love to get back to warp. |
@eglove I think the interest in Warp on WSL now is mostly Windows users wanting to use Warp now - at least that’s why I’m interested. I doubt that it’ll be a long term thing. |
What?! Did you already used WSL2?! I'm just using everything within wsl without any memory issues. |
I was able to find a workaround for the login issue! The "mimeapps.list" file was not getting updated with the custom x-scheme-handler entry for "warp://" files/URLs, so I added "x-scheme-handler/warp=dev.warp.Warp.desktop" to the end of that file (for me, located at ~/.config/mimeapps.list). Then, I updated the WSL's .desktop file database with the command "update-desktop-database", and finally I had to open a second WSL command line tab to use this command: "xdg-open [PASTE AUTH URL HERE]" on the command line once I got the auth url after logging in. Make sure you surround your URL with double quotes, and then go check your Warp terminal-- you should be successfully logged in! (Not sure if it matters, but I just realized one of the first things I tried was to replace the "%U" with "%u" in the dev.warp.Warp.desktop file, and I forgot to change it back, so that may or may not have contributed to my success.) |
This way i also got it working. Thats pretty Easy.
But as some other already mentioned, there are issues with window resizing and login-auth-token pasting stuff... I worked around it and now i can play around 😍 |
I couldn't get the login working using @TechNerd8 method. Running the I did find another workaround by using an AutoHotkey script to type in my auth token. Create a .ahk file with the script below, then open it in AutoHotkey. Then click in the auth token field and press Ctrl + 5, the token will be typed in. Finally, press enter and you will be logged in. You can then delete the .ahk file if desired.
|
I also just tried this, but whenever I launch the app, it just crashes immediately... |
Just adding the fact that it run on WSL2 arch on framework laptop 13. Running it with |
I got warp terminal working on windows 11 using the suggested install. This uses window 11's GUI apps. reading
Notes: don't maximise window otherwise you might face resizing issues
update: I can copy and paste using ctrl + shift + v |
funny enought: |
Hmm... my wsl is probably differently configured. Do you have installed all x11 dependencies? |
It works! And that too with no setup 🎉 |
@ljtruong Uh, copy and paste works. I didn't change any settings, it just works out of the box. Maybe try again? |
Create a .bat file and edit via notepad and add the above code snippet and should be able to open warp with one click. |
Getting the following issue when running on WSL2 with Ubuntu 24.04 and Windows 11. RUST_BACKTRACE=full warp-terminal
14:03:27 [INFO] Spawning terminal server process...
thread 'main' panicked at /home/runner/work/warp-internal/warp-internal/ui/src/windowing/winit/app.rs:156:14:
should be able to create event loop: Os(OsError { line: 80, file: "/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) })
stack backtrace:
0: 0x564a4b572cbb - <unknown>
1: 0x564a4ad75d20 - <unknown>
2: 0x564a4b56e243 - <unknown>
3: 0x564a4b572a54 - <unknown>
4: 0x564a4b574fd0 - <unknown>
5: 0x564a4b574cef - <unknown>
6: 0x564a4b5754ee - <unknown>
7: 0x564a4b5753f2 - <unknown>
8: 0x564a4b5731b6 - <unknown>
9: 0x564a4b575160 - <unknown>
10: 0x564a4aa2b265 - <unknown>
11: 0x564a4aa2b7b3 - <unknown>
12: 0x564a4c6da704 - <unknown>
13: 0x564a4c43033f - <unknown>
14: 0x564a4c42efb3 - <unknown>
15: 0x564a4b545da3 - <unknown>
16: 0x564a4b545dbd - <unknown>
17: 0x564a4b564a05 - <unknown>
18: 0x564a4b54632c - <unknown>
19: 0x7f8eedc6c1ca - <unknown>
20: 0x7f8eedc6c28b - __libc_start_main
21: 0x564a4ab73c3e - <unknown>
22: 0x0 - <unknown>
14:03:27 [INFO] Received empty message; assuming the connection has been closed. |
@matifali Try to run this command and run the application , might fix your issue
|
@matifali if you try installing the packages in the above comment, mind doing so one at a time and letting me know which package fixed the issue (if any)? |
@SubhamSubhasisPatra @vorporeal Looks like all packages are already installed. sudo apt update && sudo apt install -y fontconfig libegl1 libwayland-egl1 libxcursor1 libxkbcommon-x11-0
Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Ign:2 https://releases.warp.dev/linux/deb stable InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 https://releases.warp.dev/linux/deb stable Release
Hit:7 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
fontconfig is already the newest version (2.15.0-1.1ubuntu2).
libegl1 is already the newest version (1.7.0-1build1).
libegl1 set to manually installed.
libwayland-egl1 is already the newest version (1.22.0-2.1build1).
libxcursor1 is already the newest version (1:1.2.1-1build1).
libxkbcommon-x11-0 is already the newest version (1.6.0-1build1).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
warp-terminal
08:24:28 [INFO] Spawning terminal server process...
thread 'main' panicked at /home/runner/work/warp-internal/warp-internal/ui/src/windowing/winit/app.rs:156:14:
should be able to create event loop: Os(OsError { line: 80, file: "/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
08:24:28 [INFO] Received empty message; assuming the connection has been closed. |
Hm. Make sure you have wslg installed: https://github.com/microsoft/wslg It provided the components necessary to run graphical applications within WSL. |
@vorporeal it is. I can launch other GUI apps like |
@matifali what's the value of the |
echo $WAYLAND_DISPLAY
wayland-0 |
Hey @matifali, |
@vlisovych Wow. Yes, it's working with sudo; why, though? |
@matifali @vlisovych What's the output of running A couple issues on the WSL side that might be relevant: |
find /run /mnt/wslg -name "wayland-0" 2>/dev/null | xargs ls -la
srwxrwxrwx 1 atif atif 0 May 9 21:02 /mnt/wslg/runtime-dir/wayland-0 |
@matifali @vorporeal
|
@Stelminator yeah that seems plausible. Is your user a member of the |
Yeah I think this is the relevant issue on the WSL side: microsoft/WSL#11542 |
For me this gives, ls -lad /mnt/wslg/runtime-dir/
drwx------ 4 atif atif 120 May 9 21:02 /mnt/wslg/runtime-dir/ Looks like permissions are correct. |
I met the same problem in #4910 and another guy also met the same problem on comment under #4903 |
This is linux support not WSL support, headline pretty misleding |
hmm, not that simple. As the WSL distros are mainly based on "server" rootfs, you lack a ton of libraries and other settings (cgroup2 is still a "hack", in case your app relies on it --> containerd/docker/others) So providing "support on WSL2" is ensuring the app fully runs as intended (there is/was some copy/paste issues, resizing the window not supported, etc...) I do not work for Warp, just a WSL afficionado that has experienced the same recurring issues in other apps. |
The problem may be caused by Ubuntu 24.04 + WSL2. WSL2's wslg is bound to user id 1000 by default, in previous versions of Ubuntu, 1000 was the user we created, but in ubuntu 24.04, id=1000 is the user ubuntu. The user we created could be 1002... This is the default result of my ubuntu 24.04 installation via the MS Store: ❯ ls -lad /mnt/wslg/runtime-dir/
Permissions Size User Date Modified Name
drwx------ - ubuntu 13 Jul 19:14 /mnt/wslg/runtime-dir
❯ cat /etc/passwd
ubuntu:x:1000:1001:Ubuntu:/home/ubuntu:/bin/bash
casey:x:1002:1002:Casey TSui:/home/casey:/usr/bin/zsh The solution, I think, can be found here. https://canonical-ubuntu-wsl.readthedocs-hosted.com/en/latest/tutorials/cloud-init/ . In short, set your userid to 1000. |
if anyone is wondering the ubuntu LTS(22.04.3) wsl version lags a bit but works flawlessly otherwise. |
Works on WSL2, Ubuntu 22.04.3 LTS on Win11 after sudo apt install -y firefox wslu without that step it was stuck of the telemetry step. |
I have it working here but the keyboard layout seems messed around. My layout is BR ABNT2 and I have it set with |
I was able to get it to work on my arch install. The issue might have been due to a problem with After fixing that, I was able to launch warp terminal with
sudo sed -i.bak -e 's/^Exec=warp-terminal %U$/Exec=env WGPU_BACKEND=vulkan warp-terminal %U/' "/usr/share/applications/dev.warp.Warp.desktop"
λ cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.61+Branch.main.Sha.54f177d201aecda01347f952e01777c75480fc74
Built at: Tue Apr 2 20:52:28 UTC 2024
Mariner: VERSION="2.0.20240112"
DirectX-Headers:
mesa:
pulseaudio: 6f045ff0dca233a939a2aba815f84d177e294122
FreeRDP: c4030980b29322a9cb2190711a5fadeeeb8b6a33
weston: f227edd681479ec3cb2290a25d84d2d3462aebfa
❯ wsl --version
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.26120.1350
❯ Get-ComputerInfo | Select-Object OsName, OsVersion, WindowsVersion, OsBuildNumber
OsName OsVersion WindowsVersion OsBuildNumber
------ --------- -------------- -------------
Microsoft Windows 11 Pro 10.0.26120 2009 26120 |
What worked for me is just running So this might be an easy to develop solution to add WSL support for windows users: Just add a configuration setting which default shell should be used, and then run that as first command. I guess the windows terminal program does it in a similar way. |
The issue for users to track and show support for running Warp for Linux on WSL.
To be clear, we are still working on making a native Warp for Windows (
exe
), which we will post about on #204 later this year so stay tuned!We have a list of workarounds to issues running Linux here. If none of the workarounds help, please open a new GitHub issue and include logs along with your Linux distro, installation (WSL, Baremetal or VM, x86 or ARM), and the issue you had.
How important is this feature to you?
Please add a 👍 to the original post at the top to signal that you want this feature, and subscribe if you'd like to be notified. We'll be posting updates on this thread (if/when this is being worked on).
Please avoid comments with spam-like "+1" or 👍 .
The text was updated successfully, but these errors were encountered: