pwshub.com

GNU screen 5 proves it's still got game even after 37 years

GNU screen is included in most Linux distros, but newer, fancier tools such as tmux often outshine it.

GNU screen 5.0.0 is the latest version of a tool that's been around since early 1987. This release has multiple tweaks to its (admittedly basic) user interface, much improved color handling, and better authentication support, including the ability to password-protect screen sessions.

This is only the second major release this century. Screen, which we will capitalize for clarity, is old enough that the history of its releases is obscure, but initial release notes were published in 1987. A possibly unofficial version 4 appeared around 2004, replaced by a more official 4.2.0 in 2014. The last point release, 4.9, was two years ago.

GNU screen showing two different types of system monitor. From Solaris to Xenix, screen is very similar.

GNU screen showing two different types of system monitor. From Solaris to Xenix, screen is very similar

Screen is a terminal multiplexer, or a sort of call-forwarding service for the Unix command line. There are newer ones, which we'll get to, but Screen can do most of what they do.

For those who aren't habitual command line jockeys, we'll try to explain with a parallel. Imagine you are sitting at home on a laptop and you open a terminal window on your computer, then use that window to SSH into a different computer at the office and start some long, complicated process that will take hours. This doesn't have to be anything arcanely technical. Let's say you're writing a book and have several files open, one with the list of contents, another with a scratchpad, and the main draft document.

If you use a simple connection and accidentally close the window, you've lost that terminal session with three files open. Even if you saved all your documents and haven't lost any work, it will take some time to reopen them and find where you were. Screen puts a rerouting layer between your terminal window and the computers you're talking to. So, before you connect, you run Screen, then connect. If your laptop's battery suddenly runs out, no problem.

The next day, you retrieve the power lead, open Screen, and reconnect to yesterday's session with screen -r – and there are your files, exactly where you left them. Or you could switch to your desktop, open Screen and attach to that waiting session by name. Screen is capable enough that the different sessions can be on different computers, so a single terminal can manage multiple connections at once.

There are more modern terminal multiplexers around, such as tmux or the simpler dvtm, which only handles local sessions but works with the separate abduco to handle remote ones. A fancy modern equivalent, written in Rust, is Zellij. The most visible difference is that these all are tiling environments. Separate sessions appear side-by-side, or any other arrangement you prefer, on screen – all in text mode, without any graphical environment, including on the system console. However, Screen can do that as well. Pressing Ctrl+a, S splits the screen horizontally, or Ctrl+a, | splits it vertically.

As you might expect for a non-obvious program that's been around for decades, there are lots of tutorials for Screen around. It may take a while for them to pick up the new features in this release – and it will doubtless take most distros a while to incorporate version 5 too – but that doesn't reduce their helpfulness.

The biggest advantage of Screen over its younger rivals is its ubiquity. It runs on more or less every Unix-like OS out there, and has few dependencies. ®

Source: go.theregister.com

Related stories
1 week ago - 22.04 to 24.04 upgrade temporarily withdrawn, but will be back Ubuntu 24.04.1 is still available, but for now you can't update to it from Jammy Jellyfish until a bug is sorted. To compensate, there are some fun goodies coming in 24.10.…
1 week ago - The kind of thing the big names should be doing instead of working with proprietary vendors OneFileLinux is a very different sort of distro that runs entirely from your UEFI system partition, without a bootable USB key or any other...
1 week ago - VirtualBox's refreshed UI brings a more modern feel, including a switch from simplified controls for beginners to full settings for experienced users, and more.Read Entire Article
1 month ago - Plus: Three-year-old ProxyLogon flaw added to CISA's exploited bugs list Microsoft says it's investigating issues with a patch intended to plug a two-year-old flaw in the GRUB open source boot loader that is crashing some dual-boot...
1 week ago - The Juno Tab 3 sports an all-metal chassis measuring 10.89 x 7.77 x 0.34 inches (276.6 x 197.4 x 8.7 mm) and weighs 1.74 pounds (790 grams). It features a 12.1-inch IPS touchscreen display with a 3:2 aspect ratio, 2,160 x 1,440 pixel...
Other stories
23 minutes ago - Act fast to grab this high-performing mesh router for less than $500, keeping you connected while saving some cash too.
23 minutes ago - If the old-school PlayStation is dear to your heart, you can soon relive those totally sweet 1990s memories. Sony is releasing a series of products...
24 minutes ago - If you've got an old phone to part with, T-Mobile is offering both new and existing customers the brand-new Apple iPhone 16 Pro for free with this trade-in deal.
24 minutes ago - Who doesn't want the best for their beloved pooch? Grab some of these tasty treats to make your dog feel special.
30 minutes ago - To be fair, Joe was probably taking a nap The Iranian cyber snoops who stole files from the Trump campaign, with the intention of leaking those documents, tried to slip the data to the Biden camp — but were apparently ignored, according...