# Vscode with ssh environment variables

**URL:** <https://discourse.julialang.org/t/vscode-with-ssh-environment-variables/36471>\
**Category:** General Usage\
**Created:** [March 24, 2020, 11:24pm UTC](https://discourse.julialang.org/t/vscode-with-ssh-environment-variables/36471 "2020-03-24T23:24:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [March 24, 2020, 11:24pm UTC](https://discourse.julialang.org/t/vscode-with-ssh-environment-variables/36471/1 "2020-03-24T23:24:04Z")

</div>

When running vscode over ssh, loading the julia REPL loads julia-1.3, but I would like to use julia 1.4. This is presumably because `ENV["PATH"]` for the REPL only contains `/julia-1.3.1/bin`. But I don’t know where that PATH environment variable comes from. My `.bashrc` and `.profile` are both pointing to julia 1.4, and when I open a terminal inside vscode over ssh, the PATH contains both 1.4 and 1.3 (but 1.4 is first, so `julia` runs julia-1.4). And when I do plain `ssh` outside of vscode, only 1.4 is in the PATH.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [March 25, 2020, 1:03am UTC](https://discourse.julialang.org/t/vscode-with-ssh-environment-variables/36471/2 "2020-03-25T01:03:22Z")

</div>

I think there are some VS Code settings that one can use to add things to env vars. Here is one theory: you have that configured to add `/julia-1.3.1/bin` to your `PATH`. Your bash profiles are adding Julia 1.4 to the `PATH`. When you start a plain terminal in VS Code, you therefor end up with both in the PATH. But when you start a Julia REPL in VS Code, it starts it directly, not inside a shell. So whatever you have configured in your bash stuff doesn’t apply, but any VS Code setting would still affect things.

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [March 25, 2020, 11:15am UTC](https://discourse.julialang.org/t/vscode-with-ssh-environment-variables/36471/3 "2020-03-25T11:15:53Z")

</div>

The mystery is how it found `/julia-1.3.1` in the first place, over `ssh`. I assumed it would just run `julia`. I tried uninstalling and reinstalling, to no avail.

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [March 25, 2020, 2:40pm UTC](https://discourse.julialang.org/t/vscode-with-ssh-environment-variables/36471/4 "2020-03-25T14:40:06Z")

</div>

Found a solution: it turns out that the settings for running over ssh are in a separate `settings.json` file on the remote machine (as you would expect). But when you go through `Language Specific Settings`, there’s no way to get to that file. You have to use `Settings -> Remote [SSH: ...] tag -> Extensions -> Julia -> Edit in settings.json`, then you can specify the path in `"julia.executablePath": "/..."`
