joelspadin / vscode-remote-x11

Visual Studio Code extension that sets the DISPLAY environment variable in remote workspaces
39 stars 9 forks source link

remoteX11.SSH.host&port not working #27

Closed WXZhao7 closed 4 years ago

WXZhao7 commented 4 years ago

Today I find that remoteX11.SSH.host and remoteX11.SSH.port are invalid for remote X11. Here I show two tests.

1. The linux(ubuntu) is in the public network and Windows laptop shared network by mobile phone.

The settings of ssh and remote X11: (Here the Remote X11 host and port are invalid)

image

Then reload the window:

image

The output of Remote X11 and Remote X11(SSH): (The extention correct the host and port automatically)

image

Even the DISPLAY number is different, it does work.

image

2. The linux(ubuntu) is in the local network, but it's 22 port 22 is forwarded to 2222 by the router and the router is in the public network. So I can using the PUTTY or Remote SSH in the Windows to connect the linux.

The settings of ssh and remote X11: (Here the Remote X11 host and port are random)

image

The output of Remote X11 and Remote X11(SSH): (The extention find the local address of the linux automatically and the the Remote X11 host and port are invalid)

image

The putty work normally.

image

I think there may be some strange problems here.😅

joelspadin commented 4 years ago

Try setting the remoteX11.SSH.host and remoteX11.SSH.port settings in your remote settings instead of your user settings. From the Settings page, use the "Remote" tab:

image

I'm not sure why it would be ignoring those settings for you, as I think VS Code should load user settings too, but I intended for those settings to be set on the remote machine so you can set a different host and port for each machine.

WXZhao7 commented 4 years ago

Try setting the remoteX11.SSH.host and remoteX11.SSH.port settings in your remote settings instead of your user settings. From the Settings page, use the "Remote" tab:

image

I'm not sure why it would be ignoring those settings for you, as I think VS Code should load user settings too, but I intended for those settings to be set on the remote machine so you can set a different host and port for each machine.

Thanks! Now it do work~

joelspadin commented 4 years ago

Great! I'll see if I can find some way to force you to set those in the remote settings.