| News | Features | Interviews |
| Blog | Contact | Editorials |
| Linux Screen tutorial and how-to |
| By Thom Holwerda, submitted by MOS6510 on 2012-08-30 23:11:19 |
| "You are logged into your remote server via SSH and happily plucking along at your keyboard and then it happens. Suddenly, the characters stop moving and then you get the dreaded 'Connection Closed' message. You have just lost your session. You were halfway through some task and now you have to start over. Ugh. Well you can prevent this from happening by using screen. The Linux screen tool can not only save you from disconnection disasters, but it also can increase your productivity by using multiple windows within one SSH session. I use this tool all of the time in our server management work." An older tutorial, and even though I have little to no knowledge about screen, I know one thing: lots of people swear by it. |
| RE[2]: This is the kind of thing that pisses RMS off |
| By karunko on 2012-08-31 07:29:48 |
|
> If that kind of thing pisses you off, you probably need to get out more. Seriously. Especially if you didn't even write the f**king thing. Pardon me for the intrusion, but from were I stand it would appear that you are the one who's pissed off? The O.P. is right and I was disappointed to see that, at least initially, he had been modded down just for putting things into perspective. And yes, I used (or rather, had to use) "screen" in the very early 90s... on SCO UNIX, no less! ;-) Oh, and "screen" was great for TIA, aka The Internet Adapter (http://en.wikipedia.org/wiki/The...). Anyone remember that? RT. Edited 2012-08-31 07:48 UTC |
| RE: tmux |
| By Laurence on 2012-08-31 07:44:48 |
|
I'm another Tmux user as well. Used to run GNU Screen heavily, then discovered Tmux and never looked back. |
| .screenrc |
| By Risthel on 2012-08-31 11:23:11 |
|
hardstatus alwayslastline hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw~*~@ ~?%{=b kR} (%{W}%n*%f %t%?(%u)%?~ *~@~{=b kR})%{= kw}%?%+Lw%?~*~@ ~?%= %{g}][%{Y}%l~*~ @~{g}] %{=b C}[ %m/%d %c ]%{W}' An then, you are good to go :) |
| Comment by OSbunny |
| By OSbunny on 2012-08-31 12:21:53 |
| Isn't screen obsolete now that we have GUIs everywhere? It's much easier to just open a new tab in Konsole (or your favourite terminal app) and make another SSH connection. If you are using Windows you just open up another putty window. |
| RE: Comment by OSbunny |
| By ssokolow on 2012-08-31 12:46:04 |
|
> Isn't screen obsolete now that we have GUIs everywhere? It's much easier to just open a new tab in Konsole (or your favourite terminal app) and make another SSH connection. If you are using Windows you just open up another putty window. Aside from terminals not having support for detaching and re-attaching sessions the way screen and tmux do, my responsive, lightweight terminals of choice (uxterm and urxvt) don't always do tabs. (urxvt does, but it's basically a Perl script that does textual tabs in a manner inferior to screen or tmux) Also, terminal tabs are less than ideal if you have to open a new SSH connection every time you Ctrl+Shift+T rather than just running screen on the remote system and doing Ctrl+a c. |
| RE: Comment by OSbunny |
| By Soulbender on 2012-08-31 14:56:44 |
|
> Isn't screen obsolete now that we have GUIs everywhere? No. > It's much easier to just open a new tab in Konsole (or your favourite terminal app) and make another SSH connection. Pressing Ctrl-b+c is a lot quicker and easier than opening a new tab and making a new connection. Not to mention that the screen/tmux session survives disconnects. |
| Is mosh not an option here? |
| By Gaius_Maximus on 2012-08-31 15:13:47 |
| I hear it's pretty good. |
| Less-than-three screen |
| By StephenBeDoper on 2012-08-31 20:11:27 |
|
Started using screen after an OSNews article/link a few years ago, now I find it absolutely indispensable. Though it can get a bit disorienting sometimes, especially when working via remote desktop session running PuttyCM, with 3 or 4 tabs/connections open, each with at least 2 or 3 screens open. My favourite trick with screen is using my smartphone to monitor a long-running process (E.g. rsync'ing a few GB of data from one server to another). I just start the process in a screen session via my desktop/laptop, then connect to the same account through SSH, and use "screen -x [session id]" to connect to the same session. The same strategy also works well for doing remote support/training via SSH (and much easier to setup that most desktop-sharing solutions I've used). |
| Comment by marcp |
| By marcp on 2012-08-31 20:40:36 |
| I prefer to use TMUX. It's much more responsive, cleaner and generally better. Screen is kinda sluggish and old. |
| RE[2]: Personally, I like tmux better. |
| By tidux on 2012-09-01 02:06:13 |
|
http://mosh.mit.edu/ That might be exactly what you're looking for. |
| News | Features | Interviews |
| Blog | Contact | Editorials |