My *nix world

Screen is overlooked

Yes, screen is overlooked! I'm not talking about your cathode ray tube nor your computer monitor but the GNU Screen application that, if you are a computer geek or just an everyday system administrator, it's kind of busybox of virtual console multiplexing.

Screen is overlooked

click to zoom

Until I found it my live was a nightmare, I really was in the Stone Age. Now, making my first steps in this new virtual console multiplexing world, I feel already being part of the New Stone Age, the Neolithic.

GNU Screen is, according to their website:

Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.

So what? What is it good for? Why should I need another window manager, it's not just (good) enough the GNOME, KDE, XFce, LXDE, etc ? Well, that's another story...

Let my first put this question: have you ever opened a SSH connection on a remote terminal, started a long running job when suddenly your connection just died and so your task (when it was almost 99% done) ?

May I ask something else? How do you connect a remote terminal via SSH and work into two-three different console windows? I used to open two-three different SSH sessions, each on its own console window so I could run multiple commands/jobs simultaneously. Not anymore, now I'm in Neolithic, remember?

I will try to explain with my bad English, but in a plain English, what is this program good for:

  • you establish only one remote connection but work on multiple terminal windows simultaneously
  • you can switch between these windows, you can name them, you can split them (so you display 3-4 windows on the same terminal, seeing what's going on on each of them)
  • you can leave the job[s] running in these windows while you are "detaching" from them, (even) log-off from your remote (eg. SSH) connection, come back after few hours/days (eventually from your home/office/other terminal), "reattaching" to those windows just to see that everything keeps working (and hopefully with the job[s] completed)
  • of course you can copy/paste between these windows, you can deliberately close/kill/exit each of them, you can
  • you can log and monitor the windows activity, lock the screen (unlock by password)
  • other few dozens of useful functions

As you can see in the screenshot above I have only one remote SSH connection and a terminal where are shown three different windows (splitted vertically): one which runs a ping command, the second with runs a top command and the last one which runs an system update. Each window has its own status bar where you can see its name, the current/focused one is shown on bottom as a red button.

If you just google a bit I'm sure you will find at least few hundred pages that praise this magnificent tool but I would recommend the "Using GNU Screen" article on Debian Administration weblog.

Once you have installed the tool and opened on a remote system I would recommend you just to press CTRL-a and ?. That way you will invoke the help which in turn will show you the key bindings. Before running this tool it worth reading the man pages or even the /etc/screenrc configuration file, because all the key bindings (+ other options) are defined there.

In Gentoo the package is called app-misc/screen and is very well documented here.

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
Screen is overlooked

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
Screen is overlooked

Latest posts by Eugen Mihailescu (see all)

Tagged on: , , ,

2 thoughts on “Screen is overlooked

Leave a Reply

Your email address will not be published. Required fields are marked *