Keeping the browser terminal session connected
-
Many times there is a need to keep multiple browser terminal sessions open across different apps and systems and the information from one is necessary for the other.
However it's super frustrating when some timeout happens and reloads the terminal w/o warning. This results in a loss of all the accumulated information in that session and requires a long redo process.
How do we prevent the websockets from timing out?
Why isn't there a keepalive?Can we improve the reconnect as a keepalive instead?
-
I can't find an obvious explicit timeout, maybe the browser suspends the tab or so? How long a timeout are we roughly talking about and does this also happen if you use the cloudron cli tool to open a terminal into the app? Will keep some terminal tabs open to see if I can reproduce this easily, so far I haven't at least noticed it.
-
You should use tmux or gnu screen for that use case
https://www.gnu.org/software/screen/manual/screen.html
https://github.com/tmux/tmux/wikiI prefer tmux myself.
Ah, sorry, you are talking about the browser shells only?
-
Yes, I believe he is and I‘ve noticed the same annoyance a couple of times. I think it depends on your specific browser and how it handles power management.
-
@Kubernetes TY, I made it clearer in the OP.
@necrevistonnezr Thanks for the hint. I am trying out the Staying Alive extension to see if it does the trick for the domain or just the terminal sessions.
-
No go so far with the extension.
Console log shows:
Uncaught Error: Could not dispose an addon that has not been loaded at Proxy._wrappedAddonDispose (terminal-BYZevxTX.js:8:31585) at l.dispose (terminal-BYZevxTX.js:8:31403) at WebSocket.<anonymous> (terminal-BYZevxTX.js:9:1319) terminal-BYZevxTX.js:9 Socket closed. Reconnecting... cs.js:65
-
Do other solutions, like for example guacamole suffer from the same issue?
I think i am personally leaning towards using the cloudron cli, as this way I can use tmux for persistence and can even share the session. I had tabs crashing because too much memory was used and a reload will always start a new session.
-