Learn how to create a great screen profile which is loaded automatically each time you use screen.

What Isscreen?

You may ask why would I want to start a screen inside my terminal, and can you definescreenbetter/further?

Terminal window showing the manual page for the Mutt email client on Linux

This clearly annoying situation is one you want to avoid at all costs.

Simply executescreenat the command line and you’re in.

You may have to press enter or space to get through thescreensplash screen.

Article image

Shutterstock/Andrey Suslov

You will see a new command prompt.

Press the key sequenceCTRL+a>

to return to the command prompt of the parent shell session.

Then, it’s possible for you to execute

to see a list of active screen sessions.

The Linux GNU Screen splash screen

The only section we will be using is the.screenrccode, reproduced below.

Defining a Great .screenrc Configuration

The.screenrcfile is a hidden configuration file in your home directory.

Let’s call our scriptmake_screenrc.shor similar.

Our .screenrc template

‘commands which set the virtual bell message to’!Bell!'.

I have found however that the virtual bell often does not work.

Next, we set some specifictermcapinfocodes to enlarge out output buffer and adjust window resizing.

We also remove various potentially annoying key bindings and add a few handy keyboard parameters.

All we have to do to activate this new.screenrcconfiguration is to open a newscreensession.

We will now benefit from the newly defined parameters.

Wrapping up

Defining a great default.screenrcfile helps when you usescreena lot.