How can I share a terminal session in two different terminal emulator windows or ssh sessions?
Why?
I run pianobar on an old laptop to listen to music from Pandora. I usually start pianobar through ssh from another laptop to be able to control it from the other room. However when I am moving between rooms, I have to terminate pianobar across the ssh session and start it locally on the old laptop if I want to control it.
How?
I have been using the "screen" command for some time to maintain sessions across different ssh sessions. It turns out "screen" has a multi-user mode.
To share a terminal, you just follow these steps:
Back to listening to pianobar now :)
Why?
I run pianobar on an old laptop to listen to music from Pandora. I usually start pianobar through ssh from another laptop to be able to control it from the other room. However when I am moving between rooms, I have to terminate pianobar across the ssh session and start it locally on the old laptop if I want to control it.
How?
I have been using the "screen" command for some time to maintain sessions across different ssh sessions. It turns out "screen" has a multi-user mode.
To share a terminal, you just follow these steps:
- Start "screen" through an ssh session or a local terminal emulator.
- Go to the another terminal session and start "screen -x". You will need to specify the tty to attach to if you have started more than one.
- Voila ! These two sessions are identical. You can follow the progress of a command or control it simultaneously from both sessions.
Back to listening to pianobar now :)