Comments on Linux screen Command: Keep Processes Running Despite a Dropped Connection
Linux screen Command: Keep Your Processes Running Despite A Dropped Connection I guess you all know this: you are connected to your server with SSH and in the middle of compiling some software (e.g. a new kernel) or doing some other task which takes lots of time, and suddenly your connection drops for some reason, and you lose your labour.
17 Comment(s)
Comments
Information on screen is surprisingly hard to find, maybe because the name is impossible to search on.
This page is pretty good.
I usually search the web for "screenrc" which is sure to find stuff related to screen :)
An article about screen can be very useful, since most new users are unaware of such a utility. In fact, most users never even realise that such a capability could be possible on the command line! But unfortunately, the article does not do a very good job at providing a clear introduction to screen.
1) The text is thoroughly confused about terminology. What the author refers to as "sessions", are actually called "windows" in the screen manpage.
2) The article also confuses a screen window (incorrectly called a session) with the shell running inside it. "exit" has nothing to do with screen. The text says: "To close a screen session where all tasks are finished you can type ''exit''". Exit is not a screen command, its a shell command. It does not close a screen session, it can possibly close the current screen window, because it actually causes the shell to exit.
3) The description of detaching and reattaching sessions is the only part that actually talks about sessions, and not about windows. But it is not consistent in the running example. The article fails to explain how a user can end up with two sessions in the "screen -ls" example.
The author should definitely spend some time checking their facts and making sure their introduction on the topic does not confuse basic terms like this. Here is a very good introduction to screen for reference:http://www.kuro5hin.org/story/2004/3/9/16838/14935
Dear sameerds, the article is clear a and very understanble, if you think you can write better one, just do it, but this one is FINE! ;-)
Thanks for posting, dude, this is exactly what I've been looking for. Google got it in first hit ;-) Simply great!
This article was very useful to me, thanks for taking the time to write it!
-A
sameerds, the article is great, who cares if the manual calls them "Sessions" or windows, the point is to introduce the command to people who doesn't know it.
Thanks for this, it's been a great help... the man page on 'screen' is huge. This is right to the point.
Yeah, but for some reason, the hot-keys were not included on the --help option, it only shows the options available. Luckily I ran on this article.
If you've ever had to manage remote servers from my family farmhouse with DSL over 1940's telephone poles that run a half mile from the country road through a winter storm, you'll know what a lifesaver the "screen" command
write error - broken pipe
Hi Screen session keeps vanishing after 10-12 days I'm running a multiplayer host and every 10-12 connection is lost and when I try screen -ls No Sockets found , any idea on how to solve this problem on my virtual hosted server.
Thanks
I really like this documentation. It is clear and quick to use. This is something I am glad I added to my UNIX toolbox.
Also useful if you want to attach to a session you've left attached elsewhere is the command line option -d which forces the other machine(s) to detatch. If you want to connect without detatching other machines (i.e. share a session) use the option -x
Another trick worth looking into (and i'm no server expert here) is the "nohup [command] &" command which allows you to disconnect and let a process run without your connection. Worth looking into. I had problems with screens disconnecting when I shut my computer down.
Beautiful piece of information. Very consise and just what is needed.
Thanks for this, it's been a great help... the man page on 'screen' is huge. This is right to the point.
Thanks very much! Very short and informative tutorial!
Whenever I have option, I use tmux instead, so much better, nicer, cleaner tool...