jeanp413 / open-remote-ssh

VSCode Remote Development: Open any folder on a remote machine using SSH.
MIT License
279 stars 37 forks source link

How to use X11 from remote-connected vscode? #49

Open GitMensch opened 1 year ago

GitMensch commented 1 year ago

The following works:

a) remote workspace b) opening [remote] terminal c) starting DISPLAY=localip:1234 xterm -ls from the terminal

Does not work:

1: do b and c with a command defined in the code workspace - I always get

/usr/bin/xterm: Xt error: Can't open display: localip:1234

2: "automatically" setup DISPLAY variable and local port forwarding (it seems that this is the case with the MS remote ssh extension , maybe depending on ssh config file

3: using manual port forwarding with the "Ports" view (did with both 1234 and 7234 (x11 base port 6000 + display number), then used DISPLAY=1234 xterm -ls/DISPLAY=:1234 xterm -ls/DISPLAY=localhost:1234 xterm -ls, both on the [remote] terminal and via vscode commands)

How should this work?

GitMensch commented 1 year ago

friendly ping

lex-ibm commented 1 year ago

I don't see nothing on the code that implies X11 support (also looking on how to do this). It might be possible given that the ssh2 library used to connect provides X11 forwarding support, but support for it needs to be added to open-remote-ssh.