I’m trying to split a WSL terminal (e.g., WSL Ubuntu) in the cursor, However, I encounter the error: “The terminal process failed to launch: Starting directory (cwd) ‘/mnt/c/Users/xxx/Documents’ does not exist.” The directory definitely exists in WSL. I don’t experience any issues when splitting a PowerShell terminal.
Hey @kamusis
Please send more information as described here: Cursor - Build Software Faster
I can only put one embedded media item in the post.
01) Screenshot of issue (redact any sensitive information)
02) Steps to reproduce
Launch New terminal of Ubuntu(WSL), then “Split terminal”, always got error
03) System Information from:
Version: 0.40.4
VSCode Version: 1.91.1
Commit: 63dae81aea2c3fc079420fe72578a8eef26ba870
Date: 2024-09-05T02:52:05.660Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631
04) Are you using a VPN or Zscaler?
NO
05) Developer tools console errors
Writing file
m
workbench.desktop.main.js:21475 Writing file
m
workbench.desktop.main.js:21166 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ workbench.desktop.main.js:21166
workbench.desktop.main.js:21475 Writing file
m
workbench.desktop.main.js:21475 Writing file
m
2
workbench.desktop.main.js:21968 The terminal process failed to launch: Starting directory (cwd) "/mnt/c/Users/kamus/OneDrive/Documents" does not exist.
console.error @ workbench.desktop.main.js:21968
06) Logs
from main.log
2024-09-19 10:22:12.142 [info] update#setState disabled
2024-09-19 10:22:12.143 [info] update#ctor - updates are disabled as there is no update URL
2024-09-19 10:22:12.252 [error] [storage state.vscdb] error checking size of src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.workspaceUser: Error: Unexpected number of rows - 0
Hey, try this:
Open settings.json
through the menu: File > Preferences > Settings
, then click on the {} icon to switch to the JSON view.
Manually set the correct working directory: "terminal.integrated.cwd": "/mnt/c/Users/xxx/"
.
If this doesn’t help, try updating WSL.
When setting “terminal.integrated.cwd” to “/mnt/c/Users/xxx/”, both “New terminal” and “Split terminal” operations result in an error: “The terminal process failed to launch: Starting directory (cwd) “/mnt/c/Users/xxx/OneDrive/Documents” does not exist.”
Currently, the setting is “C:/Users/xxx/OneDrive/Documents/”, which corresponds to the actual directory name in the Windows filesystem. With this configuration, “New terminal” works correctly, but “Split terminal” still produces an error. (leaving the setting to default blank value produces the same error)
The WSL2 version is already up-to-date at 2.3.21.0. It’s unlikely that this error is related to the WSL version, considering that the “New terminal” command can successfully open a WSL terminal without any issues. The problem seems to be specific to the “Split terminal” functionality when used with WSL.
It’s also important to note that this error only occurs when splitting a WSL terminal. Splitting a PowerShell terminal works without any issues.
I think the issue is with the split terminal. This might be fixed in the next version, so please wait for the updates. It works fine without the split terminal, right?
yes, works fine without split WSL terminal.
- new any type of terminal → no problem
- new powershell terminal or CMD terminal, then split → no problem
- select existing pwsh/cmd terminal, then split a WSL terminal → no problem
- select existing WSL terminal, split any type of terminal → GOT ERROR
it means, Selecting a non-WSL terminal allows splitting into any type of terminal without issues. However, whenever a WSL terminal is chosen as the base to attempt splitting a new terminal (regardless of the type), an error is always encountered.