Plotting while working with VS Code remote - ssh


I found a nice and simple solution for plotting while working with vscode remote over ssh. Maybe it’s obvious or there is a simpler solution, but wanted to share it anyways: I connect an extra ssh session with X11 forwarding

ssh -Y user@host

and set the display env variable for the vscode remote workspace to

    "terminal.integrated.env.linux": {
        "DISPLAY": "localhost:10.0",

localhost:10.0 seems to be consistent if you only open one window. You can check with


in the extra session that’s connected with X11 forwarding.

And that’s it. Afterwards you can plot on the remote and it uses your local xserver for displaying the window. Tested it with gr.

1 Like

Thanks! This is useful for my workflow.