2

There are numerous tools for using numerous terminal prompts from a single window, like gnu screen---but I'm wondering about the opposite. I'd like to access the same prompt from different windows. In particular, I'm using NoMachine to run a virtual desktop where there is a particular tty I'd like to access from a normal SSH session. Is there a way to attach to the same tty session from the SSH session?

1 Answers1

2

You can use either screen or tmux to attach to the same (remote) tty from multiple other source (client) locations.

But you might be asking how to make either screen or tmux gain control of an existing tty. I don't know how to do that, but you could re-parent an existing process (perhaps even a shell) to a tty that is owned by screen or tmux using reptyr. See one of multiple references on use of reptyr: here orhere. Others exist, I'm sure.