Telnet into your server.
screen -R -T vt100
Now do whatever you want, open a file with less, edit a file in vi, or
start a TUI, or whatever.
Now hit that big X in the upper corner. That is right, just toast your
telnet session, donâ€™t exit out if it, just toast it.
Now log into your server again.
screen -R -T vt100
You should be right back where you left from! Screen does not terminate
when your session drops, and it holds whatever programs, or sessions you
have open with it open too. Even ssh sessions to other servers.
I have the line â€œscreen -R -T vt100â€³ as the last line in my .profile on
my server, and it was saving my tail almost daily while I was WFH. Every
time the VPN dropped me, I didnâ€™t have to start over what was doing, or
wonder just what the patch job did when it got terminated half way
(Technical NOTE: The -R tells screen to reconnect to any unconnected
screen session for the user, and if there isnâ€™t one, start a new one, so
it either starts new, or connects. The -T gives screen the terminal
type. I found that programs like vi went nuts without this.)
Screen does lots of other cool things too. Here are some good sites
Another cool feature is that two (or more) people can connect to the
SAME screen session. Great for training and collaborating. Since you can
do a telnet/ssh session from screen, there is no need for it to run on
your server, you can just start from your server and go from there. I
havenâ€™t thoroughly tested that feature yet.
Here is my .screenrc file:
hardstatus string â€˜Current:%n %t | %W | %C%A %D, %M %d, %Yâ€™
bell_msg â€˜BEEP on %nâ€™
It gives me a nice status line at the bottom with a list of the open windows within screen and their names. I use some scripts to make sure my new windows get good names when I open them. I havenâ€™t experiemented with the status line much, but it could probably be a lot fancier.
you have to go to the command mode (ctrl a and type multiuser on and
then command mode again and type acladd userid where userid is the
person you want to share with and you have to do that for every userid.