# How to enable (and use) persistent remote connection with VSCode/tmux?

**URL:** <https://discourse.julialang.org/t/how-to-enable-and-use-persistent-remote-connection-with-vscode-tmux/76926>\
**Category:** VS Code\
**Tags:** question, ssh\
**Created:** [February 22, 2022, 5:46pm UTC](https://discourse.julialang.org/t/how-to-enable-and-use-persistent-remote-connection-with-vscode-tmux/76926 "2022-02-22T17:46:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [February 23, 2022, 8:22am UTC](https://discourse.julialang.org/t/how-to-enable-and-use-persistent-remote-connection-with-vscode-tmux/76926/5 "2022-02-23T08:22:38Z")

</div>

> [@sylvaticus](#):
>
> Just to be sure, to “open a new Julia REPL session” normally I just start evaluating something in the file and Julia “starts”, are there other ways to start/reconnect Julia REPL to existing sessions ?

Just do whatever you do normally, all methods to open a new REPL should reconnect automatically.

> [@sylvaticus](#):
>
> Also, sometimes I need to kill Julia and restart it. If I do it ( `CTRL+d` ) in the remote “persistent” session I get a message “Pane is dead” and then I need to open a new bash terminal and type `tmux kill-server` .  
> Is this the way to do it ?

`Alt-J Alt-K` will kill the Julia process and ask you whether you want the tmux session to close as well. Otherwise you should be able to close the dead pane with `Ctrl-B X Y` too.

> [@sylvaticus](#):
>
> Finally, if I try to scroll the persistent terminal panel, instead of the old terminal lines I get the current prompt changing to the history of commands. Again, is there a way to get it scrolling like in the local terminal ?

Enable mouse mode in tmux by putting `set -g mouse on` into your ~/.tmux.conf.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-enable-and-use-persistent-remote-connection-with-vscode-tmux/76926)._
