This was the 10-year anniversary of the creation of ColaLUG, and the club's first president, Steven Nance came and told us a bit of the origins of the club. He also gave a very comprehensive demonstration of using the screen package. For people working with text and command-line logins, it is a very powerful tool.
Steven has kindly provided his presentation notes for the screen presentation. I include those below.
screen
Screen is a multiplexing terminal application with tons of features. Including, but not limited to:
- Terminal detachment Logging Multiple windows Copying and pasting between terminals Multiple "regions" on one terminal Window sharing Window monitoring Hardware status line
Getting started.
- $ screen
First get help.
- ^a ?
Do your thing and detach.
- ^a d
Look at what we have.
- $ screen -ls
Wipe if necessary.
- $ screen -wipe [PID]
And reattach.
- $ screen -r [PID] $ screen -RD [PID]
Creating new windows.
- ^a c
Navigating windows.
- ^a n ^a p ^a a ^a [0-9] ^a '
Oh no!! I'm lost. List windows.
- ^a w ^a "
I need a better naming convention. Renaming.
- ^a A
Jeez.. What time is it? Load average and time.
- ^a t
Is that compile done on window 17? Idle monitoring.
- ^a _
Are my friends logging into my irc room? Activity monitoring.
- ^a M
I'm a multi-tasker
New regions
- ^a S
Groovy, but how do I move regions?
- ^a TAB bind j focus down bind k focus up
But how do I use "bind"? Screen commands and rc file.
- ^a :
- screenrc
But can "bind" make life easier?
- bind 'P' screen top
Does this region make my bottom look to big? Resizing regions
- resize +
Can we log any of this?
- ^a h screen -H ^a L
But I need this in the other window. Scrollback and copy/paste
- ^a ESC space enter ^a ]
^a >
Ok.. maybe not that much of a multi-tasker. Kill a region.
- ^a X
Ssssh. I need quiet. Visual bell.
- vbell on
WTF?!? "Wuff, Wuff!!"
- vbell_msg "beep"
Now things are getting dark and scary. Sharing your screen.
- $ screen -x [PID] multiuser on aclchg weener +r "#" screen -r nances acldel weener
Uh oh... The boss is coming! Clear screen or switch to blank.
- ^a C ^a -
I'm a screen geek.. No really. Disable line wrap or get attached displays.
- ^a r ^a *
I just screened a screen.
- ^a a
My screen is all garbled. Redraw or reset
- ^a l ^a Z # not to be confused with z for suspend
Kill em all and let root sort them out.
- ^a Q
a \
.screenrc stuff:
- startup message
- startup_message off
- termcapinfo xterm ti@:te@ termcapinfo xterm-color ti@:te@
- defscrollback 2000
- screen -t name num command
- hardstatus on hardstatus alwayslastline hardstatus string "%w%=%m/%d %c"
- escape ^Ll
other advanced:
- screen exchange more detailed copy/paste with scrollback nav digraphs update names with PS1
wikipedia# http://en.wikipedia.org/wiki/GNU_Screen user manual# http://www.delorie.com/gnu/docs/screen/screen_toc.html printed man# http://www.lulu.com/content/477066 mailing list# http://lists.gnu.org/archive/html/screen-users/ gentoo tips# http://gentoo-wiki.com/TIP_Using_screen cool tips# http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html multiuser# http://www.pixelbeat.org/docs/screen/ man page# http://www.hmug.org/man/1/screen.php
Columbia, SC Linux Users Group