Button to re-connect to terminal in RStudio Server Terminal tab


#1

I’m finally getting around to trying out RStudio remotely through RStudio Server (on a Docker instance FWIW).

Same look and feel I’m used to with RStudio – excellent!

One issue I’m running into a lot here involves the terminal tab. I’m finding that as I switch back and forth between RStudio and other program windows or browser tabs, the connection to the terminal seems to be lost quite frequently (typing in the terminal tab gives no response).

This can be fixed by simply opening a new terminal, but this feels hacky. Two suggestions:

  • Build in a “Reconnect” button, much like Jupyter has for reconnecting to disconnected kernels
  • Make closing terminal tabs easier (AFAICT there’s no keyboard shortcut for doing so, and there’s no “x” in the sub-window of terminal tabs – I have to click through the drop down window and select “close” each time.

#2

Thanks for the feedback. I have opened an issue on this: https://github.com/rstudio/rstudio/issues/1844

The terminal is supposed to reconnect automatically in this situation, so I need to investigate why it isn’t.

Also, there is an “x” that closes the current terminal, shown circled here:


#3

@GaryR thanks for the follow-up. Does that mean you were able to reproduce? Let me know anything I might try to elucidate the issue if not.

Automatic reconnect behavior is nice, but it’d also be nice for the user to feel like they have the reins and offer the option to force reconnect; thanks for the heads up re: the :heavy_multiplication_x:


#4

Yes, I was able to reproduce what I believe is the same issue. An explicit “force reconnect” command isn’t a bad idea, would prevent getting stuck in other cases we might come across that auto-reconnect doesn’t handle.


#5

@michaelchirico, would you be willing to try out current preview release? It’s a patch for RStudio Server 1.1 at
https://www.rstudio.com/products/rstudio/download/preview/
and contains a fix so that the terminal reconnects. (You might still see the error message in the console, though.)


#6

@rblum will do when I’m back in the swing of things. Any ideas for looping that version in to a Dockerfile? My current setup downloads from s3 (current.ver). Thanks in advance!


#7

If you can wait a week or so, that version will become the stable release, which is easy to incorporate. If you’d rather user a Dockerfile which tracks the preview version, we have a redirector you can use which provides a stable URL to the most recent preview. Documentation here: