+1 on this. I love how I can do code . from within WSL to open the folder in VS Code. After following all the steps with the latest version this is still not working for me.
I canât connect to my Ubuntu 20.04 Distro of WSL2, it just shows âOpening Remoteâ and "Starting VS Code in WSL (Ubuntu-20.04) forever it seems.
Hi! Sorry about this! What version are you on? Has WSL ever worked for you?
Hey! Do things work if you run the Fix WSL command from Ctrl + Shift + P? And then try to reconnect? Our patch tries to inject a .cursor-server/server-env-setup file which seems to be nonexistent for you.
If that doesnât work, could you report the output of the following command in Powershell (after replacing YOUR_WINDOWS_USERNAME):
powershell.exe -ExecutionPolicy Bypass -File "C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\fixWSLNew.ps1" -pathToAdd "C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app" -scriptPath "C:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\server-env-setup"
I am using windows 11 and the version of Cursor is 0.17.0., WSL is 2.0.9.0. I usually use VSCode to connect to WSL.
Fix WSL Install becomes ârecently usedâ and I try to reconnect, but I still get the same error.
I was having the same errors, and executing this command solved it. Thank you!
Iâm having the same issues as everyone else.
/mnt/c/Users/xx/AppData/Local/Programs/cursor/resources/app/bin/cursor: 62: /mnt/c/Users/xx/AppData/Local/Programs/cursor/resources/app/bin/../cursor: not found
When i run the the fix WSL install script command inside of cursor, it does nothing, except uninstall all my WSL extensions. It doesnât help with launching cursor from the WSL terminal.
My workaround is just opening folders from within cursor.
For anyone that is looking for a fix to the opening cursor from the terminal issue. Thereâs a github issue that proposes a fix.
Itâs done by user ddwang. Hereâs the link to his github gist.
It works. However the downside is that it downloads the vscode server everytime you use it in a new terminal, unlike vscode where it only downloads it once. If anyone has the time to fix that issue, that would be cool, please share if you do. Itâs in my to-do list, just havenât gotten around to it.
Has there been any update for this?
Iâm having the same problem as @jqlive and @k-ta ⊠running the script provided by @truell20 did not fix the issue for me ![]()
Just paid for a year sub and hit this issue instantly. I canât launch cursor from my wsl2 terminal typing âcode .â or âcursor .â - but if I open cursor from Windows and connect to WSL, it works successfully. Re-opening cursor through Windows maintains the WSL2 connection.
p@YODA:~$ code .
Unable to determine app path from symlink : /mnt/c/Users/p/AppData/Local/Programs/cursor/resources/app/bin/code
p@YODA:~$ cursor .
To use Cursor with the Windows Subsystem for Linux, please install Cursor in Windows and uninstall the Linux version in WSL. You can then use the cursor command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Cursor with the environment variable DONT_PROMPT_WSL_INSTALL defined.
/mnt/c/Users/p/AppData/Local/Programs/cursor/resources/app/bin/cursor: 62: /mnt/c/Users/p/AppData/Local/Programs/cursor/resources/app/bin/âŠ/cursor: not found
Can confirm this is happening for me. Nothing works so far:
- Tried uninstalling/re-installing cursor
- Tried âFix WSL Installâ command via Cmd+Shift+P
- Tried: powershell.exe -ExecutionPolicy Bypass -File âC:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\fixWSLNew.ps1â -pathToAdd âC:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\appâ -scriptPath âC:\Users\YOUR_WINDOWS_USERNAME\AppData\Local\Programs\cursor\resources\app\bin\server-env-setupâ
Using âConnect to WSLâ command and then using terminal within Cursor works, but this terminal doesnât have all my bash_profile settings, so itâs not usable.
I guess Iâll hold off on buying a Cursor subscription until this is fixed.
I got it working by forking @ddwangâs script â This fixes using "cursor" command in WSL · GitHub
Spent way too many hours debugging this.
The default âcursorâ script is a Mac-only script. It doesnât work with WSL at all. Thatâs why it complains when you try to run it.
asuna@ASUNA:~$ type code
code is /mnt/c/Users/tejsr/AppData/Local/Programs/cursor/resources/app/bin/code
asuna@ASUNA:~$ code
Unable to determine app path from symlink : /mnt/c/Users/tejsr/AppData/Local/Programs/cursor/resources/app/bin/code
I dont cursor run on code in wsl I selected cursor command on installation but its still mapping to code
This issue is fixed in todayâs 0.41.1 release!
