getcursor / cursor

The AI Code Editor
https://cursor.com
23.95k stars 1.5k forks source link

Integrated terminal X11 forwarding not work when using Remote SSH #815

Open HuangJiaLian opened 1 year ago

HuangJiaLian commented 1 year ago

When I use the Remote - SSH plugin connect to the folders on my Linux server. The X11-forward of the integrated terminal is not enabled. And an error Error: Can't open display: occurred.

image

However, when I close the remote connection and log into the server manually using the ssh -X command, it works fine.

image

It seems that when using remote ssh, the terminal ignores the -X option. I already added these two lines in .ssh/config, and it also works well in Vscode.

  ForwardX11 yes
  ForwardX11Trusted yes

Here is my system Info: MacOS 13.5 Version: 0.8.5 VSCode Version: 1.80.1 Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771 Date: 2023-08-26T19:52:38.290Z (1 day ago) Electron: 22.3.10 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin arm64 22.6.0

Steps reproduce the error:

  1. Install the latest version of Cursor
  2. Install Remote - SSH plugin
  3. Connet to the remote server
  4. Use xeyes to test X-forwarding

Thanks for your help.

shirgur commented 9 months ago

Same here. Works fine with VSCode, but does not work with cursor

noibar commented 9 months ago

+1

vuhn-tree commented 4 months ago

Running into the same issue. Digging a little, I'm seeing the error:

X11 connection rejected because of wrong authentication.

A very crude workaround I've found so far is to have both Cursor and VSCode running and connected to remote SSH at the same time. Then running xeyes from Cursor lunches.