Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

screen command to persistently enable menu at bottom

I am using the Linux Screen Utility to open more than 2 windows in my Putty terminal. Usually while running a screen session a

Ctrl+A Ctrl+W

gives us a list of window at the bottom of the screen.

I have two questions:

  • I wanted to know if there is a way to persistently keep this menu at the bottom of the screen.

  • How to give name to each window? Ideally when we execute

    screen -S screen_name

the screen_name should appear in the menu. I can only find

0.csh 1.csh 2.csh

in the menu. can this be changed to

0.debug_screen 1.editor 2.games
like image 202
Shehbaz Jaffer Avatar asked Oct 31 '13 11:10

Shehbaz Jaffer


People also ask

What is the screen command?

screen command in Linux provides the ability to launch and use multiple shell sessions from a single ssh session. When a process is started with 'screen', the process can be detached from session & then can reattach the session at a later time.

What is the command used for simple use of GNU Screen?

Log files of current screen sessions can be started with the Ctrl+a H command, which will make a file called screenlog. X where X is the number of your screen session. A screenshot of what is currently in your screen window can be invoked with Ctrl+a h, creating a file called hardcopy.

How do you reattach a screen session?

To start a screen session, you simply type screen within your ssh session. You then start your long-running process, type Ctrl+A Ctrl+D to detach from the session and screen -r to reattach when the time is right.


1 Answers

I have following lines in my .screenrc (found in Short Tip: GNU Screen with proper scroll, session management support):

caption always # activates window caption
caption string '%{= wk}[ %{k}%H %{k}][%= %{= wk}%?%-Lw%?%{r}(%{r}%n*%f%t%?(%u)%?%{r})%{k}%?%+Lw%?%?%= %{k}][%{b} %Y-%m-%d %{k}%c %{k}]'

A description of those cryptic identifiers can be found in the screen manpage, section STRING ESCAPES.

Btw.: Instead of caption you can also use hardstatus (which is displayed only once at the bottom line if you use split screens).

Windows can be renamed using C-a A (see again screen manpage, section Commands).

like image 121
bmk Avatar answered Oct 02 '22 23:10

bmk