# Remote plotting using ssh and visual studio code

**URL:** <https://discourse.julialang.org/t/remote-plotting-using-ssh-and-visual-studio-code/48015>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [October 9, 2020, 4:22am UTC](https://discourse.julialang.org/t/remote-plotting-using-ssh-and-visual-studio-code/48015 "2020-10-09T04:22:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dale\_James\_Black](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dale_james_black/32/11595_2.png) [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Post date:** [October 9, 2020, 4:22am UTC](https://discourse.julialang.org/t/remote-plotting-using-ssh-and-visual-studio-code/48015/1 "2020-10-09T04:22:57Z")

</div>

I am on a MacBook Pro and I am using visual studio code to ssh into my university cluster. I have XQuartz downloaded onto my MacBook and when I open up a basic terminal and remote into my cluster I can run commands like `xclock` and display a GUI on my Mac. I cannot get this to work when I remote in using visual studio code and run `xclock` from the embedded VS terminal. I want my workflow to be done entirely in visual studio but this is not realistic if I cannot plot in VScode. Does anyone know how to fix this issue as I am guessing this is something to do with the settings in visual studio code specifically?

This is the error I get inside VS

```julia
[djblack@login-i17:~] $xclock
Error: Can't open display: localhost:10.0
[djblack@login-i17:~] $

```

---

<div class="post-metadata">

**Author:** ![healyp](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@healyp](https://discourse.julialang.org/u/healyp)\
**Post date:** [October 9, 2020, 6:19am UTC](https://discourse.julialang.org/t/remote-plotting-using-ssh-and-visual-studio-code/48015/2 "2020-10-09T06:19:38Z")

</div>

I think this is an `ssh` issue. Try using the `-X` flag which will “project” windows onto your screen.

---

<div class="post-metadata">

**Author:** ![Dale\_James\_Black](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dale_james_black/32/11595_2.png) [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Post date:** [October 9, 2020, 6:28am UTC](https://discourse.julialang.org/t/remote-plotting-using-ssh-and-visual-studio-code/48015/3 "2020-10-09T06:28:20Z")

</div>

I should’ve mentioned that in the original post. I ssh’ed using the -X flag. I am assuming it’s something with the settings in VScode because I can launch GUIs when I ssh inside my regular terminal but I can’t when I ssh directly from VScode. I am just not sure what settings I need to change
