If you see that your remote session in finished due inactivity, you can use this tool. Screen is a full-screen window manager that multiplexes a physical terminal between several processes.
Below are the most basic steps for getting started with screen courtesy of this website:
- On the command prompt, type screen.
- Run the desired program.
- Use the key sequence Ctrl-a + Ctrl-d to detach from the screen session.
- Reattach to the screen session by typing screen -r.
This example shows how to use Screen is a full-screen software program that can be used to multiplexes a physical console between several processes. For this it is shown through a countdown program as you can exit and enter the same process.
You should have a compiler installed and Screen. Ubuntu Linux:
apt-get install build-essential cmake
apt-get install screen
Open a terminal and type:
sh run.sh
screen -ls ( list screen session)
A typical output should look like this one.
There is a screen on:
3119.Counter (Detached)
screen -r Counter (attach session)
Press CTRL a + d (dettach session)
A typical output should look like this one.
Second 120
Second 119
Second 118
Second 117
Second 116
Second 115
Second 114
Second 113
Second 112
Second 111
Second 110
Second 109
Second 108
[detached from 3119.Counter]
https://www.gnu.org/software/screen/manual/screen.html