Open LudwigStumpp opened 1 year ago
Not exactly solving the issue, but just in case fyi - had a similar issue and ended up adding the WSL extension to the Cursor IDE - now using the WSL terminal / Cursor there and that's working well for me atm.
Not exactly solving the issue, but just in case fyi - had a similar issue and ended up adding the WSL extension to the Cursor IDE - now using the WSL terminal / Cursor there and that's working well for me atm.
Hi, thanks for your additional input on this. Indeed for me within the WSL extension I am also able to open any folder on the WSL from within the IDE. However I would like to be able to use the cursor
command from the WSL terminal (as it works the same for VSCode).
Although this is not a blocker but it is really convenient to open your folders from wsl terminal. facing exactly same issue.
For some reason the default cursor
shell script is very different from the equivalent code
script from VSCode. Maybe it was forked from an earlier branch?
In any case, I took the latest VSCode code
script and modified it for Cursor and WSL.
It works well for me and I'm able to launch Cursor directly from a WSL prompt, e.g.:
$ cursor .
Here's the gist: https://gist.github.com/ddwang/0046da801bcb29d241869d37ad719394
To use, simply replace your cursor
script, usually found at /mnt/c/Users/<USER_NAME>/AppData/Local/Programs/cursor/resources/app/bin/cursor
@ddwang your script works perfectly for me, but it downloads the vs code server every time I run "cursor ." Unlike vs code which just does that once and opens normally on subsequent runs
Another use case is to apply the $PATH
from the Terminal to Cursor.
I use @ddwang's script and so far it is working. But I have problems opening two or more projects at the same time from WSL in Cursor. Having opened a WSL project in Cursor and then starting Cursor from WSL in a different project directory, Cursor starts but then displays the error message "Could not fetch remote environment".
Another observation is that I have to repeat the process of replacing the script every few days. The script is apparently being reset to its original state on a regular schedule.
I can also no longer start the original VSCode with code .
Instead, I keep getting the following error message:
Unable to determine app path from symlink : /mnt/c/Users/
/AppData/Local/Programs/cursor/resources/app/bin/code
@vincentsch thanks for the debugging. I'll take a look this wknd and hopefully resolve these issues
@vincentsch thanks for the debugging. I'll take a look this wknd and hopefully resolve these issues
Were you able to resolve this?
I hope someone is working on this! I love using Cursor on my work macOS machine, but this is a blocker for me on my home Windows machine
+1 Same issue on my WSL
Still having this issue as well for anyone else running into this post. Fresh Win11 image + WSL2 install. Can connect to WSL remote when inside Cursor but can't do it through WSL terminal. Also tried the "Fix WSL install" through the command palette.
Same here - still does not work from the console directly.
any updates on this?
I forked @ddwang 's script, made a couple improvements, and it's working for me: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
Wasted way too much on this, but at least it works now 👍
I forked @ddwang 's script, made a couple improvements, and it's working for me: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
Wasted way too much on this, but at least it works now 👍
this worked for me, thanks a lot.
I didn't find cursor on my windows variables tough, so maybe i got a slightly different install from you as i just installed this on my windows machine a couple days ago.
Remove "c:\Users\
\AppData\Local\Programs\cursor\resources\app\bin" from Windows Environment Settings
I forked @ddwang 's script, made a couple improvements, and it's working for me: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
Wasted way too much on this, but at least it works now 👍
today i got this error:
ln: failed to create symbolic link '/home/xxx/.cursor-server/bin//bee043c1bb0095dab94043787985ccfc7cc38e50/bin/remote-cli/code': File exists
and when i opened cursor it seems it downloaded the WSL server again :(
I forked @ddwang 's script, made a couple improvements, and it's working for me: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
Wasted way too much on this, but at least it works now 👍
Rebooted my computer and now i get this
$ cursor .
ln: failed to create symbolic link '/home/xxx/.cursor-server/bin//1252dd54bee0d8caa777cd58df6ab01192a69c30/bin/remote-cli/code': File exists
/home/hems/.local/bin/cursor: 87: /mnt/c/Users/xxx/AppData/Local/Programs/cursor//Cursor.exe: not found
Rebooted my computer and now i get this
$ cursor . ln: failed to create symbolic link '/home/xxx/.cursor-server/bin//1252dd54bee0d8caa777cd58df6ab01192a69c30/bin/remote-cli/code': File exists /home/hems/.local/bin/cursor: 87: /mnt/c/Users/xxx/AppData/Local/Programs/cursor//Cursor.exe: not found
and if i go to C:\Users\xxx\AppData\Local\Programs\cursor the entire folder is empty.
i had to download cursor again and install and it works again.
Cursor on WSL seems very unreliable. I wonder why the entire folder got wiped.
Maybe i accepted some update pop up and don't remember it. weird.
I forked @ddwang 's script, made a couple improvements, and it's working for me: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
Wasted way too much on this, but at least it works now 👍
it's work for me
Hvaing the same issue on WSL cursor .
command will output:
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.
./cursor: 62: ./../cursor: not found
Having the same issue.
Having the same issue.
[When VSCode or Cursor updates,cursor
perhaps have some problem. Use the following script to resolve.
cd /usr/local/sbin/
, create a file, mine is fix-cursor
#! /bin/bash
win_cursor_path="/mnt/c/Users/WINUSERNAME/AppData/Local/Programs/cursor/resources/app/bin/"
cd $win_cursor_path
wget -O cursor.sh https://gist.githubusercontent.com/ddwang/0046da801bcb29d241869d37ad719394/raw/088836e0d946de07a82c245066ef07ddc35e9f53/cursor.sh
mv cursor cursor.backup
mv cursor.sh cursor
sudo chmod 777 fix-cursor
, and refresh environment source ~/.zshrc
or source ~/.bashrc
cursor
was not work, fix-cursor
can fix it.https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4
This's better than me.
When VSCode or Cursor updates,
cursor
perhaps have some problem. Use the following script to resolve.
cd /usr/local/sbin/
, create a file, mine isfix-cursor
- paste code below
#! /bin/bash win_cursor_path="/mnt/c/Users/WINUSERNAME/AppData/Local/Programs/cursor/resources/app/bin/" cd $win_cursor_path wget -O cursor.sh https://gist.githubusercontent.com/ddwang/0046da801bcb29d241869d37ad719394/raw/088836e0d946de07a82c245066ef07ddc35e9f53/cursor.sh mv cursor cursor.backup mv cursor.sh cursor
- Replace WINUSERNAME by your own
- Give permissions to shell
sudo chmod 777 fix-cursor
, and refresh environmentsource ~/.zshrc
orsource ~/.bashrc
- When
cursor
was not work,fix-cursor
can fix it.
I got this error
--2024-09-14 05:11:28-- https://gist.githubusercontent.com/ddwang/0046da801bcb29d241869d37ad719394/raw/088836e0d946de07a82c245066ef07ddc35e9f53/cursor.sh
Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.111.133, ...
Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2154 (2.1K) [text/plain]
Saving to: ‘cursor.sh’
cursor.sh 100%[=================================================>] 2.10K --.-KB/s in 0.001s
2024-09-14 05:11:28 (4.02 MB/s) - ‘cursor.sh’ saved [2154/2154]
mv: cannot move 'cursor' to 'cursor.backup': Is a directory
mv: cannot move 'cursor.sh' to 'cursor': Is a directory
@MediconcenVictor U can remove cursor, it is a folder in your system. cd /mnt/c/Users/WINUSERNAME/AppData/Local/Programs/cursor/resources/app/bin/"
rm -rf cursor
is this being worked on as it broke the CLI for vs code and cursor never worked... so it is a bit annoying that it broke another tool...
I encountered a related issue. When I run echo $PATH
in the VS Code terminal using Bash, I observed the following output:
xxxx:/c/Users/xxxx/AppData/Local/pnpm:xxxx
Additionally, within the cursor position, I found:
xxxx:%PNPM_HOME%:xxxx
This discrepancy seems to be causing the problem.
Just run this:
echo 'export PATH="$PATH:/mnt/c/Users/<YOUR_USERNAME>/AppData/Local/Programs/cursor/resources/app/bin"' >> ~/.bashrc
source ~/.bashrc
Issue
Calling
cursor
command on WSL2 failsSpecification
WSL2 Path has
Note
>WSL: Connect to WSL
Has anyone experienced the same issue or has an idea for me to try out?