Cascaded screen sessions

This is not an EndeavourOS specific question - but I hope there is someone who can point me in the right direction… I connect to a machine via ssh and start a screen session there. Now I start more “childs” (not the correct name - I now) using CTRL-a c. In one of these “childs” I connect via ssh to another machine. Now I want to start a screen session on this machine - which is successful. A terminal application now is started there and I want to watch its output from time to time. So now I want to detach screen from the last machine using C-a d - but naturally this is caught by the first machine and I detach the first screen - that is not what I want to do. Is there a way to detach the last screen? My idea was to customize C-a command (e.g. to C-A instead of C-a) - but I am unable to find in the manpage if this is possible. Or maybe there is another way?

Just to make sure, you are talking about program screen, right?

I have used screen years ago, so my info may be old. I don’t remember there’s a direct way to do that.

Is it possible to simply start another terminal where you can connect to the other machine?

If not, another idea might be try other similar terminal multiplexers like tmux, wezterm, or zellij (these are from the Arch repos, there are more in the AUR). Note that I have never used any of these, so they might not solve anything… :wink:

If should be possible to override them in screenrc. In the manpage, read the section on bind and look at the examples in screenrc

Thanks for your replies. I already have studied these instructions. I can customize / override each command that follows C-a - but not C-a itself. This “introduction command” is captured by first screen instance. I cannot see any example which can override that - explicit “change it to another introduction command”.


C-a a 100% solves my problem - many thanks!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.