Screen is overlooked


Please note that this blog has been moved.

Now it has its own domain: mynixworld.info🙂

If you want to read the latest version of this article (recommended) please click here and I open the page for you.

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.

click to zoom

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) logoff 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 CTRLa 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.

About Eugen Mihailescu

Always looking to learn more about *nix world, about the fundamental concepts of arithmetic, algebra and geometry. I am also passionate about programming, database and systems administration.
This entry was posted in linux, shell and tagged , , , . Bookmark the permalink.

2 Responses to Screen is overlooked

  1. anthonyvenable110 says:

    Reblogged this on anthonyvenable110.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s