LWN: Comments on "Using screen for remote interaction (Linux.com)" https://lwn.net/Articles/196494/ This is a special feed containing comments posted to the individual LWN article titled "Using screen for remote interaction (Linux.com)". en-us Tue, 16 Sep 2025 15:56:46 +0000 Tue, 16 Sep 2025 15:56:46 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net A 'screen' quickstart https://lwn.net/Articles/196583/ https://lwn.net/Articles/196583/ kmself <p>A few getting started pointers for screen.</p> <p>First: one of the major benefits is persistance. That is, your screen session will continue running after your initial session is disconnected. This means you can connect and disconnect at will, even from different locations, <em>and</em> can deal more manageably with intermittent connections (you know, those ones where you're <em>not</em> intentionally disconnecting, technical term is "flaky").</p> <p>Second: screen gives you some neat capabilities, among them: <ul> <li>Multiple windows. A single screen session can consist of multiple shell (or other program) instances. If you're familiar with tabbed terminal programs (e.g.: GNOME Terminal, Konsole), the concept's similar, but the management is at the remote side, and isn't lost when your terminal dies. Upwards of 30 windows, first ten are accessible with C-a-number-key.</li> <li>Split screens. You can split a single screen window into two or more simultaneously visible panes, and navigate between these with C-a-tab. Forward nav only. Useful for keeping a 'top' session running while executing other commands.</li> <li>Named windows. You can name windows to make it easier to sort out which ones are what, e.g.: 'root', 'mail', 'code', 'top', 'logs', etc.</li> <li>Copy/paste. If you're not running under X11 or another environment (e.g.: gpm, PuTTY) which allows native cut and paste, screen offers its own mechanism. Not the smoothest, but a possible lifesaver.</li> </ul> <p>To list screen sessions: 'screen -ls'. To attach if you've only got one existing session: 'screen -rd'. To attach to a specific window: 'screen -r <i>screensession</i>' (the screen session is displayed in the prior list output).</p> <p>That's the basics, there's more, but you'll get a lot of mileage with just the above. RTFM or 'C-a-?' for internal help.</p> Wed, 23 Aug 2006 01:04:26 +0000 Using GNU screen https://lwn.net/Articles/196575/ https://lwn.net/Articles/196575/ bignose Using GNU screen "for remote management" is a simple matter of connecting to the remote machine (via SSH, usually) and running 'screen' as the first command on that remote machine.<br> <p> If you're asking how to use screen at all, I found this article to be a good introduction:<br> <p> <a href="http://www.debian-administration.org/articles/34">http://www.debian-administration.org/articles/34</a><br> <p> This one is a little more stilted, but does show some of the more intermediate uses:<br> <p> <a href="http://www.linuxforums.org/applications/the_screen_program.html">http://www.linuxforums.org/applications/the_screen_progra...</a><br> <p> But the best way to learn about screen is to experiment, and make sure to refer often to 'man screen'.<br> <p> Tue, 22 Aug 2006 23:38:47 +0000 duh question https://lwn.net/Articles/196565/ https://lwn.net/Articles/196565/ ccyoung can someone tell me how they use screen for remote management? I've seen people fly with screen while I'm still stuck at ssh functionality.<br> <p> Tue, 22 Aug 2006 22:50:06 +0000 Using screen for remote interaction (Linux.com) https://lwn.net/Articles/196557/ https://lwn.net/Articles/196557/ AnswerGuy I've been using the screen multi-user mode for this sort of thing for several years. I've even had whole classrooms full of students (up to 20 at a time) all log in and screen -x (cross-over attach) to my running screen session.<br> <p> (I've also taught my systems administration students how to use this for remote collaboration, mentoring and support).<br> <p> It's supposed to have ACL features to allow one to set specific screen windows to "read-only" for and grant read/write to other users, etc. However, I've found those features to be somewhat tricky to get right; and generally not worth the bother.<br> <p> In a classroom setting this wouldn't seem to be all that useful. However, you might be surprised by how often the lighting, glare from windows, eyesight and other other factors make it difficult for students to see a terminal window at the front of the class. Having the same "live" window<br> right in front of everyone helps them see what's going on better (especially distinguishing commas from periods, backticks from single quotes, etc) and I think it keeps them more focused as well.<br> <p> Another advantage is that I can often direct students to perform certain operations on the screen (shared by all) while I'm standing and pointing things out or drawing notes or diagrams on any whiteboard nearby. (Actually I generally prefer to project the screen image directly onto a whiteboard since a traditional roll-up screen gets in the way).<br> <p> I've also used shared VNC sessions --- however those tend to bog down pretty badly if you attach ten people over 100 Mbps. Screen doesn't show the slightest lag with 20 students on even an old 10Mpbs LAN. For remote students I wouldn't want to use VNC unless their connection was very low latency and moderately high bandwidth. (Besides the classes I teach are focused on advanced systems administration and related topics --- so most of the time is spend editing/viewing configuration files, running strace/ltrace, and various command line utilities and viewing the output from them, of course. In other words there's almost no GUI component to most of my classes nor to my work in general).<br> <p> One of the few features I'd ask for (as a screen enhancement) would be an<br> option to keep the clients "lockstep" (so they all change to the same window/subsession at once, and the cut and paste highlighting is displayed on all at once, etc). Another one that would be nice would be the ability to leave all the attached clients "locked" unto one screen while the master (or some designated "leader") can have full privs to create new windows, switch to them, run programs in them and cut/paste from them into the "visible/broadcast" window).<br> <p> I suppose I should take a look at the sources and see if I can figure out how to code up a patch for all that. :)<br> <p> JimD<br> <p> <p> Tue, 22 Aug 2006 20:43:19 +0000