Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

.screenrc examples

News GNU Screen Recommended Links Examples GNU Screen logging Sven Guckes screenrc Gentoo screenrc
Attaching to and detaching from screen sessions Programmable keyboards Sysadmin Horror Stories Tips History of GNU Screen development Humor Etc

Introduction

When screen  is invoked, it executes initialization commands that are contained in two files "/etc/screenrc"  and then ".screenrc" in the user's home directory.

These defaults can be overridden in the following ways: For the global screenrc file screen searches for the environment variable $SYSSCREENRC (this override feature may be disabled at compile-time). The user specific screenrc file is searched for in $SCREENRC, then $HOME/.screenrc

If the command line option -c it given, it specifies the screenrc file to use. No other file is searched and sourced even if they exist. 

You need to make at least three changes in the /etc/screenrc to make screen more user friendly:

  1. Change the line with "#autodetach off" to "autodetach on"
  2. Remove comment sign(#) from the line "#shell -$SHELL"
  3. Uncomment the first (shorter) "caption on" line
[0]test01@ROOT:/etc # egrep "^#autodetach|#shell|caption always" /etc/screenrc
#autodetach off
#shell -$SHELL
# caption always "%3n %t%? @%u%?%? [%h]%?%=%c"
# caption always "%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw %=%{mk}@%H %{yk}%D %{ck}%M%{wk} %{ck}%d %{gk}%c"

After that screen is workable condition and you can start screen session  by simply typing screen on the command line. You will get terminal window with the last line reserved for screen information.  and can type any command it in it. If you close session, screen autodetach its session and it will be preserved so if you connect letter you can connect to is by typing screen -r and get the same environment which you left. Which in most cases is a big productivity booster.

 

Structure of RC file

Examples provided with distribution

Two configuration files are shipped with screen distribution: etc/screenrc and etc/etcscreenrc. They contain a number of useful examples for various commands.

The simplest ~/.screenrc  can have four lines:

shell -${SHELL}
caption always "%n(%t) : %C"
defscrollback 4098
startup_message off 

After that basic set-up the simplest way to enhance your ~/.screenrc is to add bind commands, for example

bind ' ' windowlist -b 

This screenrc  command would bind the space key to the command that displays a list of windows (so that the command usually invoked by Ctrl-a " would also be available as Ctrl-a space which is much more convenient),

shell -${SHELL} 
caption always "%n(%t) : %C"

Another useful step is to make more user-friendly caption. A better variant of caption would be

caption always "%3n %t%? @%u%?%? [%h]%?%=%c"

Slightly more complex would be:

caption always "%{= kc}%H (system load: %l)%-21=%{= .m}%D %d.%m.%Y %0c"

The value of title can be changed by command:

Ctrl-a A

You can specify in your screenrc  file arbitrary number of initial screens, for example

screen bash
title "this is my first screen"
screen bash
title " this is a screen reserved for editor"

You can combine the  command title with the command screen in one line using -t  key in screen command:

screen -ln -t "root shell" -h 1000 9 su

This command creates a window with title `root shell' in slot #9, with a superuser shell and a scrollback buffer of 1000 lines.

Autoindent mode in vi.

#register [ "\033:se noai\015a"
#register ] "\033:se ai\015a"
#bind ^] paste [.]

Change default scrollback value for new windows

I can’t just scroll back  using Ctrl+PageUp in screen. Use Ctrl-a  [ to enter Copy Mode. A status line will indicate that you have entered copy mode. You can also use activate copy mode of GNU Screen using Ctrl + Esc

Then scroll up/down using vi-style command. For example:

g moves to the beginning of the buffer.
+ and - positions one line up and down.
G moves to the specified absolute line (default: end of buffer).
% jumps to the specified percentage of the buffer.
Ctrl-u -  Scrolls a half page up.
Ctrl-b -  Scrolls a full page up.
Ctrl-d -  Scrolls a half page down.

Screen allows you to search the scrollback buffer using the following commands.

Searching:

By default, the buffer has only the last 100 lines of text. It can be modified running screen with the -h option:
$ screen -h 2000

It can be set in the .screenrc file too, by adding the following line:

defscrollback 5000			# default: 100

You can also increase the scrollback buffer in a running screen session. The man page explains that you can enter command line mode in a running session by typing Ctrl-a : , then issuing the command:

scrollback 5000 

Another tip: Ctrl-a i shows your current buffer setting.

Marking:

Once the text is marked, move to the screen window where the text is going to be copied and type Ctrl-a ]

To exit scrollback mode, hit the esc (escape) button.

See also Integrating GNU Screen copy-scrollback mode with the local system clipboard HanHuy Journal

Useful resizing commands for a split screen

Here are several useful resizing commands for a split screen.

# bind = resize =
# bind + resize +1
# bind - resize -1
# bind _ resize max

Final Tips

  1. If you have regular PC keyboard and did not reassigned CapsLock to Ctrl (for example using Sharpkeys in Windows, if you use Teraterm as a Unix telnet/ssh client) then you can change escape sequence. For example if you add
    escape ^\\ 

    into the .screenrc  you will see that ^\ became attention key sequence instead of default ^A.

    Using Ctrl-A attention sequence is acceptable only with reassigned to CapsLock Ctrl key.
     

  2. Another two good examples for study are Sven Guckes screenrc  and Gentoo screenrc
     
  3. Programmable keyboard allow using up to 48 keys for macros, replacing multi-key sequence with one key stroke. See for example Logitech G510s gaming keyboard and use of macros
     
  4. In case your TCP/IP connection is flaky (often happen with connections over VPN) use screen on the target machine not of the machine from which you connect. This way disconnect can't have drastic consequences if it happens in the middle of execution of important command for example find  with -exec option ;-).

Dr. Nikolai Bezroukov


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

[Oct 03, 2014] worklez .screenrc

http://dotfiles.org/~worklez/.screenrc 
dotfiles.org 


Log in 

Username  Password   


worklez /.screenrc 

screenrc with pretty tabs
# No bell at all
  vbell off				# default: off
  vbell_msg "   -- Ring, Ring!! --   "	# default: "Wuff,Wuff!!"

# Automatically detach on hangup. 
  autodetach on				# default: on

# Don't display the copyright page
  startup_message off			# default: on

# Affects the copying of text regions
  crlf off				# default: off

# Change default scrollback value for new windows
  defscrollback 1000			# default: 100

# Define the time that all windows monitored for silence should 
# wait before displaying a message. Default 30 seconds.
  silencewait 15			# default: 30

  shell -$SHELL

# emulate .logout message
  pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# Pretty status bar at the bottom.
caption always "%m/%d/%y %0c%{=b kg}  %l  %{=r gk}%-w%{=b wb}%50>%n%f* %t%{-}%+Lw%<%{- Wk}"

# XTERM TWEAKS
# ===============================================================

# xterm understands both im/ic and doesn't have a status line.
# Note: Do not specify im and ic in the real termcap/info file as
# some programs (e.g. vi) will not work anymore.
  termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
  terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l

# 80/132 column switching must be enabled for ^AW to work
# change init sequence to not switch width
  termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

# Make the output buffer large for (fast) xterms.
# termcapinfo xterm* OL=10000
  termcapinfo xterm* OL=100

# tell screen that xterm can switch to dark background and has function
# keys.
  termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
  termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
  termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'

# special xterm hardstatus: use the window title.
  termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
  termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'

# emulate part of the 'K' charset
  termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'

# xterm-52 tweaks:
# - uses background color for delete operations
  termcapinfo xterm* be


# WYSE TERMINALS
# ===============================================================

#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff")
#essential to have it here, as this is a slow terminal.
  termcapinfo wy75-42 xo:hs@

# New termcap sequences for cursor application mode.
  termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J


# OTHER TERMINALS
# ===============================================================

# make hp700 termcap/info better
  termcapinfo  hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'

# Extend the vt100 desciption by some sequences.
  termcap  vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
  terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC
  termcapinfo linux C8
# old rxvt versions also need this
# termcapinfo rxvt C8

# Let's remove some dangerous key bindings ...
  bind k
  bind ^k
  bind .
  bind ^\
  bind \\
  bind ^h
  bind h

# ... and make them better.
  bind 'K' kill
  bind 'I' login on
  bind 'O' login off
  bind '}' history

# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
  register [ "\033:se noai\015a"
  register ] "\033:se ai\015a"
  bind ^] paste [.]


# Resize the current region. The space will be removed from or added to 
# the region below or if there's not enough space from the region above.
  bind = resize =
  bind + resize +3
  bind - resize -3

# Time a message is displayed if screen is not disturbed by
# other activity. The dafault is 5 seconds:
msgwait 15

# Don't you want to start programs which need a DISPLAY ?
setenv DISPLAY ':0'
logfile ~/logs/screen_%Y-%m-%d_%0c

#####
# tell screen that you term can scroll
termcapinfo xterm ti@:te@
# bind Shift+PgUp/PgDn
bindkey -m "^[[5;2~" stuff ^b
bindkey -m "^[[6;2~" stuff ^f


# Bind F11 and F12 (NOT F1 and F2) to previous and next screen window
bindkey -k k1 prev
bindkey -k k2 next

daveg .screenrc

http://dotfiles.org/~daveg/.screenrc 
# daveg's suped up screenrc
# http://daveg.outer-rim.org
#
# Last Modified: Wed Sep 10 11:37AM EST 2008

# The caption line has the following entries
# username@host | uptime | time - date | screens |
caption always "%{yK} $LOGNAME@%H | %l | %C %A - %M-%d-%Y | %-Lw%50>%{Ky}%n%f* %t%{-}%+Lw%
<%{- Wk}%{yK} | " ### some basic stuff ### ######################################################################### activity "%" # tell me when stuff happens! # crlf off # no thanks. # defmonitor on # turn monitoring on # defscrollback 1000 # please sir, can i have some more? # shell -$SHELL # i'll take my default shell. # startup_message off # don't want this either. # term $TERM # We'll use whatever is currently used # ### # Let's do some bindings. ### ##################################################### bind I screen -t 'irc' bitchx -H $IRCSERVER bind M screen -t 'Email' mutt ### #bindkey -k kh select 0 # Home = screen 0 #bindkey -k k1 select 0 # F1 = screen 0 #bindkey -k k2 select 1 # F2 = screen 1 #bindkey -k k3 select 2 # F3 = screen 2 #bindkey -k k4 select 3 # F4 = screen 3 #bindkey -k k5 select 4 # F5 = screen 4 #bindkey -k k6 select 5 # F6 = screen 5 # # Keybindings for manipulating split windows # bindkey -k k7 resize +1 # F7 = Increase the current split window size by 1 line bindkey -k k8 resize -1 # F8 = Decrease the current split window size by 1 line bindkey -k k9 split # F9 = split horizontally bindkey -k k; focus # F10 = switch windows # # Keybindings for manipulating tabs # bindkey -k F1 prev # F11 = previous tab bindkey -k F2 next # F12 = next tab

.screenrc

alexandru

0. Build screen from source to fix the slowdown when scrolling in a vertical split.

1. This is my .screenrc with keyboard shortcuts and a nifty status bar. –help?

Control + Up:  previous split screen
Control + Down: next split screen
Control + Left:  previous screen window
Control + Right: next screen window
F1: kill current tab
F2: write paste buffer to file
F3: split horizontally
F4: split vertically
F5: remove single split
F6: remove all splits
F7: urlview pulls URL's from your current output, very useful
F8: new tab
F9: resize split +1 line
F10: resize split -1 line

2. Install screen_ssh.sh so your window title automatically renames to your ssh destination. To have the title revert after closing your shell follow this.

3. color = readability. Install color wrapper to colorize your terminal output. Alias man to use most as its pager. Use the following for a colorful prompt with $? in $2:

00:43:18 0 user@hostname:~/$

\[\033[1;36m\]\t\[\033[0m\] `LastExitValue=$?; if [ $LastExitValue = 0 ]; then echo \[\033[1\;32m\]$LastExitValue\[\033[0m\]; else echo \[\033[1\;31m\]$LastExitValue\[\033[0m\]; fi` \[\033[1;34m\]\u@\h\[\033[0m\]:\[\033[1;33m\]\w\[\033[0m\]\[\033[1;32m\]\$\[\033[0m\]

To remove color use: s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g

4. Yakuake is the best terminal emulator. Configure these shortcuts:

Shift + Left: previous shell
Shift + Right: next shell
F11: full screen
F12: drop down

[Aug 23, 2010] Using the screen package

2004-10-12 | LinuxQuestions.org

Customizing screen In the next few paragraphs, I will mention your screenrc file. If you want to change something for every user on your system, you will want to change /etc/screenrc. If you want to change something just for one user, change their $HOME/.screenrc file instead.

When you first run screen, you will probably get an annoying message about how it is free software and bla, bla, bla. Chances are high you will know this already, and even higher that you won't care to see this message every time you use the program. Fortunately, you can disable the message by adding:

startup_message off
to your screenrc file.

Another thing that will probably start to annoy you (and cause epileptic fits in some) is the default 'visual bell' setup. Any time a bell would normally sound (say, you hit tab for tab completion, and there are multiple matching files), the entire screen will flash. You can disable this with:

vbell off
in your preferred screenrc file.

If you don't like ctrl-a (your terminal program has a problem with it for some reason, or perhaps you use a piece of software that requires use of ctrl-a a lot), you can change the command key temporarily via the command line, or more permanently via one of your screenrc files. For example, to change to ctrl-g, you could use the command line:

screen -e^Gg
The ^G sets the control character, and the second g is the key to use to send the literal control character instead. To put an entry for this in the screenrc, use:
escape ^Gg
As with control keys, there are many more customization options than presented here. These are just the ones you are most likely to need immediately.

[Sep 15, 2009] The Many Uses of Screen By Juliet Kemp

September 11, 2009 | ServerWatch.com

Selected comments

By berto September 15 2009 2:26 PMPDT

the one i use ;)

@bertocasa (amelgar) ~ :: cat .screenrc 
#kill startup message 
startup_message off
defscrollback 1024 hardstatus on hardstatus alwayslastline
#hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}% w %=%{..G} %H %{..Y} %m/%d %C%a " hardstatus string '%{= kg}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?% Lw%?%?%= %{g}]%{=b C}[ %d %M %c ]%{W}'
screen -t rOOt 0 su -
screen -t ncmpc 1 bash
screen -t terminal 2 bash
screen -t MComander 3 mc
screen -t vimTerm 4 bash
screen -t terminal 5 bash
screen -t dropbox 6 bash

[Apr 5, 2009] Re: binding ctrl-arrow

Apr 5, 2007
From: Giulio Bottazzi

Re: binding ctrl-arrow

Date:

Thu, 5 Apr 2007 10:29:32 +0200


Hi Jonathan,

to use cat to probe for keys is a fantastic trick! Thank you very much! I really enjoy this mailing list.! Actually, using xterm and your trick I'm able to do exactly what I want with

bindkey ^[[1;5A copy

Just to let you know: the same trick does also work in aterm using

bindkey ^[Oa copy

Best, Giulio.

screenrc

By Sven Guckes
# ===============================================================
# File:               $HOME/.screenrc
# Purpose:            Setup file for program "(GNU) screen"
# written by:         Sven Guckes 
# Latest update:      Sat Feb 16 06:00:00 MET 2002
# Latest user version:  screen-3.9.11    [020215]
# Latest beta version:  screen-3.9.11beta6 [020206]
# Length and size:    450 lines and about 15 kilobytes
# ===============================================================
#
# ===============================================================
# SEE ALSO:
# ===============================================================
# SCREEN Pages:
# http://www.math.fu-berlin.de/~guckes/screen/
#
# Commands List (from the manual to screen-3.7.6):
# http://www.math.fu-berlin.de/~guckes/screen/commands.txt
#
# MailingList:
# http://www.yahoogroups.com/group/gnu-screen/
#
# ===============================================================
# ESCAPE - the COMMAND CHARACTER
# ===============================================================
# escape ^aa  # default
# escape ^pp  # suggested binding for emacs users
#
# ===============================================================
# STARTUP of programs in an extra window:
# ===============================================================
# Uncomment one/some following lines to automatically let
# SCREEN start some programs in the given window numbers:
#screen -t irssi			0 irssi
#screen -t mutt     1 mutt
# screen -t EDIT      2 vim
# screen -t GOOGLE    3 links http://www.google.com
# screen -t NEWS      4 slrn
# screen -t WWW       5 links http://www.math.fu-berlin.de/~guckes/
#
# ===============================================================
# VARIABLES - Boolean values (on/off)
# ===============================================================
  autodetach          on            # default: on
  crlf                off           # default: off
  deflogin            off           # default: on
# defsilence          off           # default: off
  hardcopy_append     on            # default: off
# nethack             on            # default: off
  startup_message     off           # default: on
# termcap  xterm      'AF=\E[3%dm:AB=\E[4%dm'
# terminfo xterm      'AF=\E[3%p1%dm:AB=\E[4%p1%dm'
# Matthias Kopfermann                     [020222]:
  termcapinfo linux "ve=\E[?25h\E[?17;0;64c" # red
  vbell               off           # default: ???
#
# ===============================================================
# VARIABLES - Number values
# ===============================================================
  defscrollback       3000          # default: 100
# msgminwait          3             # default: 1
  silencewait         15            # default: 30
#
# ===============================================================
# VARIABLES - Paths and Files (esp. programs)
# ===============================================================
# bufferfile: The file to use for commands
#             "readbuf" ('<') and  "writebuf" ('>'):
# bufferfile          $HOME/.screen_exchange
#
# hardcopydir:  The directory which contains all hardcopies.
# hardcopydir         ~/.hardcopy
# hardcopydir         ~/.screen
#
# shell:  Default process started in screen's windows.
# Makes it possible to use a different shell inside screen
# than is set as the default login shell.  Halleluja! :-)
# shell               zsh
 shell               bash
# shell               ksh
#
# ===============================================================
# VARIABLES - Strings
# ===============================================================

# some notes on COLOR before explaining its use in
# the commands caption, hardstatus, and sorendition.
#
# COLOR:  colors codes are combinations of
# [attribute modifier] [color description]
# the manual talks of "attribute/color modifiers".
# see the manual, section "STRING ESCAPES".
#
# Color table:
# 0 Black           .  leave color unchanged
# 1 Red             b  blue
# 2 Green           c  cyan
# 3 Brown / yellow  d  default color
# 4 Blue            g  green         b  bold
# 5 Purple          k  blacK         B  blinking
# 6 Cyan            m  magenta       d  dim
# 7 White           r  red           r  reverse
# 8 unused/illegal  w  white         s  standout
# 9 transparent     y  yellow        u  underline
#
# note: "dim" is not mentioned in the manual.
#
# ===========================================
# CAPTION - shows a "caption" for the window.
# ===========================================
# a "caption" is another line which can show information -
# in addition to the hardstatus line.
#
# use caption to show window list:
caption always "%{= kw}%?%-Lw%?%{+b kw}%n*%t%f %?(%u)%?%{= kw}%?%+Lw%?"


# caption always '%{= wb}%50=%n%f %t%{= wb}'
# this basically just shows the current window number and title
# on its own; the "%50=" displays it in the middle of the line.
#
# caption always "%>%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?%<"
# caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
# caption always "%?%F%{.RW}%?%3n %t%? [%h]%?"
# caption always "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
#
#  caption always "%{kG}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kG}%?%+Lw%?"
#
# "push right border: current time with seconds and current date"
# caption always "%=%c:%s %Y-%m-%d"
#
# Prints the window names and highlight the current window in yellow.
# On the right there is the time in green and the date in yellow.
#
#caption always "%?%{+b kw}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y"

#
# ===============================================================
#
# ===============================
# Hardstatus Line and sorendition
# ===============================
#
# Prints the window names and highlight the current window in yellow.
# On the right there is the time in green and the date in yellow.
#
#hardstatus alwayslastline "%?%{wk}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y"
hardstatus alwayslastline "%{+b kr}[ %H ] %{ky} Load: %l %-=%{kb} %c  %d.%m.%Y"

#hardstatus alwayslastline "%{+b kr}[ %H ] %{kw} Load: %l %-=%  %{kb} %c:%s  %d.%m.%Y "


# Colorize the "messages" and "text marking":
# Example:  Blue bg, white fg
 sorendition gK
#
# ============================
# Password
# ============================
# password SZnBqiqMtfa6k
# Do NOT remove the comment if
# you don't know what this does!
# (TODO describe the effect - obviously)
#
# ===============================================================
# Messages
# ===============================================================
# There are two kinds of messages:  "activity" and "bell"
# They are also the names of the commands that set the
# respective messages.  In every message there can be "meta
# strings" which are replaced by values.  A meta string starts
# with a percent sign and is then followed by one of the
# following letters: aAdDmMnstwWyY The meta strings refer to
# the current date and time or to a window title or number:
# %t - title
# %n - number (a single % still works)
# %d - day
# %D - weekday name
# %m - month
# %M - month name
# %y - year (2 digit)
# %Y - year (4 digit)
# %w - hour:minutes (24h format)
# %W - hour:minutes (12h format)
# %s - seconds
# %a - am/pm
# %A - AM/PM
# Older versions of screen used a single '%' character
# for window titles - but since version 3.7 this is
# obsoleted by '%n' and will vanish in future releases!
# So please update your screenrc to meet this convention!
#
# ===============================================================
# "~" stands for the "bell" character
#
# activity:   This message *includes* a "beep" with '~'.
  activity            "activity in %n (%t) [%w:%s]~"
#
# bell:       This message *includes* a "beep" with '~'.
  bell                "bell   in %n (%t) [%w:%s]~"
#
# pow_detach_msg:     Message shown when session
#                     gets power detached.
  pow_detach_msg      "BYE"
#
# vbell_msg:          Message shown when the
#                     "virtual bell" rings.
  vbell_msg           " *beep* "
#
# ==============================================================
#  BIND bind - defaults
# ==============================================================
# The "bind" command assign keys to (internal) commands
# SCREEN checks all the keys you type; you type the key
# which is known as the "command character" then SCREEN
# eats this key, too, and checks whether this key is
# "bound" to a command.  If so then SCREEN will execute it.
#
# The command "bind" allows you to chose which keys
# will be assigned to the commands.
#
# Some commands are bound to several keys -
# usually to both some letter and its corresponding
# control key combination, eg the command
# "(create) screen" is bound to both 'c' and '^C'.
#
# The following list shows the default bindings:
#
# break     ^B b
# clear     C
# colon     :
# copy      ^[ [
# detach    ^D d
# digraph   ^V
# displays  *
# dumptermcap .
# fit       F
# flow      ^F f
# focus     ^I
# hardcopy  h
# help      ?
# history   { }
# info      i
# kill      K k
# lastmsg   ^M m
# license   ,
# log       H
# login     L
# meta      x
# monitor   M
# next      ^@ ^N sp n
# number    N
# only      Q
# other     ^X
# pow_break B
# pow_detach  D
# prev      ^H ^P p ^?
# quit      \
# readbuf   <
# redisplay ^L l
# remove    X
# removebuf =
# reset     Z
# screen    ^C c
# select    " '
# silence   _
# split     S
# suspend   ^Z z
# time      ^T t
# title     A
# vbell     ^G
# version   v
# width     W
# windows   ^W w
# wrap      ^R r
# writebuf  >
# xoff      ^S s
# xon       ^Q q
# ^]  paste .
# - select -
# 0 select 0
# 1 select 1
# 2 select 2
# 3 select 3
# 4 select 4
# 5 select 5
# 6 select 6
# 7 select 7
# 8 select 8
# 9 select 9
# I login on
# O login off
# ] paste .
#
# FAQ: So many keys are bound to some command already -
#    which keys are unbound yet? Which are free for binding?
# A: SCREEN does not have a command to show you
#    a table of currently unbound keys - sorry!
#    You simply have to read this setup file. ;-)
#
#    Summary:  Here is a table of the keys
#    which are not bound by default:
#    unbound:  -B--E-G--J-L---P-R-TUV--Y-
#      bound:  A-CD-F-HI-K-MNO-Q-S---WX-Z
#
# And here are the default bind commands if you need them:
#
# bind A title
# bind C clear
# bind D pow_detach
# bind F fit
# bind H log
# bind I login on
# bind K kill
# bind L login
# bind M monitor
# bind N number
# bind O login off
# bind Q only
# bind S split
# bind W width
# bind X remove
# bind Z reset
#
# I suggest that you don't change the bidnings for
# 'H' ("log") and 'M' ("monitor") as they are really
# useful and you might want to use them a lot;
# in this case it is recommended to use
# the defaults to avoid confusion.
# personally, I use 'A' ("title") quite often, too.
#
# If you are using "split windows" already
# (this is not available in the latest user release yet)
# then you will also use the command
# associated with the keys FQSX a lot, too -
# so don't change their bindings!
#
# Anyway, I have bound the unbound uppercase letters
# to start programs in windows directly, ie without
# starting a new window with a shell within first.
# This simply saves shells and thus saves RAM -
# and also avoids that the title of a windows is
# the name of your shell.  Also, you need not "exit"
# from a shell when you are done with some program:
#
# ==============================================================
# BIND and the Services:
# ==============================================================
# I am using the uppercase letters to start programs/services:
#
 bind A title  # default!
#
# BUUG - Berlin Unix User Group - read some news about Unix
#  bind B screen -t 'buug' 4 links www.buug.de
#
# CHEM - LinuxTag event in Chemnitz -- 2002-03-09 + 2002-03-10
#  bind C screen -t 'CHEM' 9 links www.tu-chemnitz.de/linux/tag/
# NOTE:  This overrides the default binding for the "clear" command.
#
# DICT - Dictionary English<->German
# bind D pow_detach !
#  bind D screen -t 'DICT' 4 links dict.tu-chemnitz.de
# Note: this overrides the default binding for the
# command "pow_detach".  I hardly ever use that one.
#
# MUTT - Email User Agent
#  bind E screen -t 'mail' 0 mutt
# I use email quite a lot - so window #0 is reserved for that.
# see also:  http://www.math.fu-berlin.de/~guckes/mutt/
#
# FTP - File Transfer "Program"
# bind F fit # default!
# bind F screen -t 'ftp' 9 ncftp
# see also:  http://www.math.fu-berlin.de/~guckes/ncftp/
#
# GOOGLE - Web Search Engine
  bind ^g  screen -t 'Google' links www.google.com
#
# HEISE - IT NewsTicker
# bind H log # default!
#  bind H screen -t HeiseTicker links www.heise.de
# NOTE: This overrides the default binding of the "hardcopy" command!
#
# IRC - International Relay Chat
# bind I screen -t 'irc'  5 irc
# bind I screen -t 'icq'  9 micq
# see also:  http://www.math.fu-berlin.de/~guckes/irc/
#
# Feb 2002:  Use it to search the Internet Movie DataBase (IMDB):
# bind I screen -t 'IMDB' 9 links http://www.imdb.com/
#  bind I screen -t 'IMDB' 9 links http://us.imdb.com/search/
# see also: http://www.math.fu-berlin.de/~guckes/berlinale/
#
 bind K  kill # default!
# bind K
# This *removes* the binding for 'K'
# thus requireing you to enter the
# command via the command line, ie ":kill".
# This prevent accidental killing of your windows.
# Old versions of SCREEN do not prompt for
# confirmation on "killing a window", you see..
#
# LYNX - web browser
# bind L screen -t 'lynx' 4 lynx  http://www.math.fu-berlin.de/~guckes/
# see also:  http://www.math.fu-berlin.de/~guckes/lynx/
#
# see also:  http://www.math.fu-berlin.de/~guckes/links/
# bind L screen -t 'WWW'  4 links http://www.math.fu-berlin.de/~guckes/
#
# bind L screen -t 'WWW'  4 links http://www.lug-camp-2002.de/programm.html
# bind L screen -t 'WWW'  4 links http://www.mdlug.de/index.php/linuxtag2002/vortraege/v12.inc?menu=0|4|
# bind L screen -t 'WWW'  4 links http://www.mdlug.de/index.php/linuxtag2002/programm.inc?menu=0|4|&nomfc=1
#
 bind M monitor # default!
#
# NN - newsreader
# bind N screen -t 'nn' 3 nn
# see also:  http://www.math.fu-berlin.de/~guckes/nn/
# Get some news about the weather... (dont ask ;-)
#  bind N screen -t 'Nepal'  links http://www.wunderground.com/global/stations/44454.html
# bind N screen -t 'Nepal'  links http://www.wunderground.com/global/stations/10382.html
#
# Paste - use 'P' instead of ']':
  bind P paste .
# The character ']' is hard to type on german keyboards,
# as it requires the use of a yet another meta character "AltGR".
# I prefer to use 'P' for "paste" because it is a letter
# which is available at the same position both with the
# US keyboards and keyboards with "Kraut layout" -
# which I call" Krautboards", by the way. ;-)
# bind ] paste . # default!
#
#    Register page at NetMind's Service:
#  bind R screen links http://www.netmind.com/URL-minder/new/register.html
#
#
# SLRN - newsreader
#  bind S screen -t 'slrn' 3 slrn -n -C -k0
# see also:  http://www.slrn.org  http://slrn.sourceforge.net
# and      http://www.math.fu-berlin.de/~guckes/slrn/
#
# VIM - editor
  bind V screen -t 'vim' 0 vim
# Editing comes with email quite naturally -
# so I have reserved window #1 for this.
# http://www.math.fu-berlin.de/~guckes/vim/
# http://www.vim.org/ (which is just a mirror)
#
#    X - a fast way to lock the current screen.
#  bind X lockscreen
#
# bind Y exec !!! echo -n http://www.math.fu-berlin.de/~guckes/
#  bind Y stuff http://www.math.fu-berlin.de/~guckes/
# This pastes the address of my homepage to the process
# in the current window.  very nice - saves some typing.
# and you don't have to have the functionality of
# "abbreviating" in the processes themselves. :-)
#
# my binds
#
#  bind ^w screen -t 'watch' $HOME/.screen/scripts/tetherwatch
#  bind ^c screen -t 'capture' $HOME/.screen/scripts/tethercapture
#  bind ^r screen -t 'output'  $HOME/.screen/scripts/tetherout
#  bind ^o screen -t 'output-short' $HOME/.screen/scripts/tetherout.short
#  bind ^t screen -t 'sysinfo' top

#bind ^N screen -t 'news' links www.debian.de/News/weekly/index.de.html
#bind ^M screen -t w3m cm.adrenalin.de
#bind ^L screen -t watch -n 5 tail -45 /var/log/sysloc
bind ^Y screen -t log watch -n 5 rail -40 /var/log/syslog

#
#
# ===============================================================
# BIND Examples:
# ===============================================================
# You can also paste the values of
# SCREEN's environment variables:
# bind E stuff $EMAIL
# bind U stuff $URL
# bind I stuff $ICQ
#
# ===============================================================
# BINDKEY:
# ===============================================================
# [TODO briefly explain the difference between BIND and BINDKEY]
#
# Use the function keys F7 and F8
# to cycle backwards/forwards in
# the list of existing windows:
#  bindkey -k k7 prev
#  bindkey -k k8 next
#
# make the "kb" send a backspace (CTRL-H:)
# bindkey -d kb stuff ^H
# WARNING:  this does not work as advertised.
# it eats the "kb" when typing "dankbar" for example. :-(
#
#
# ===============================================================
# Key bindings  (TODO)
# ===============================================================
# Remove some default key bindings by binding
# them to "nothing" (empty right-hand-side):
#
# bind .  dumptermcap # default
  bind .
# bind ^\ quit      # default
  bind ^\
# bind \\ quit      # default
  bind \\
# bind h  hardcopy  # default
# bind h
# bind ^h ???       # default
# bind ^h
# bind }  history   # default
# bind }
#
#
# ===============================================================
# At the very end... show the current version and say hello :-)
# ===============================================================
# Briefly show the version number of this starting
# screen session - but only for *one* second:
  msgwait 1
  version
# change back to showing messages
# for duration of two seconds:
  msgwait 2
#
# Welcome the user:
  echo "welcome :-)"
#
# Ths DISPLAY variable keeps getting in my way.
# usually I do not want to start programs which
# need a DISPLAY.  Text Tools rule!  :-)
#  setenv DISPLAY ''
#
# Tell Vim to use a "tabstop" of '8',
# ie expands TABs to the next column
# whose number is a multiple of eight.
# EOF  vim: ts=8

[Jun 20, 2007] Gentoo Linux Documentation -- Keychain

Many of us use the excellent OpenSSH as a secure, encrypted replacement for the venerable telnet and rsh commands. One of OpenSSH's (and the commercial SSH2's) intriguing features is its ability to authenticate users using the RSA and DSA authentication protocols, which are based upon a pair of complementary numerical "keys". And one of the main appeals of RSA and DSA authentication is the promise of being able to establish connections to remote systems without supplying a password. The keychain script makes handling RSA and DSA keys both convenient and secure. It acts as a front-end to ssh-agent, allowing you to easily have one long-running ssh-agent process per system, rather than per login session. This dramatically reduces the number of times you need to enter your passphrase from once per new login session to once every time your local machine is rebooted.

Keychain was first introduced in a series of IBM developerWorks articles.

Current versions of keychain are known to run on Linux, BSD, Cygwin, Tru64 UNIX, HP-UX, Mac OS X, and Solaris using whatever variant of Bourne shell you have available.

[Jun 10, 2006] eater.org-blog GNU Screen Hackery

Most people who do lots of work in a Linux terminal use GNU screen (tabbed terminals are for chumps.) If you're not familiar, it works like this: type screen. Type ctrl-a, c to create a new window. Type ctrl-a, p to go to the previous window, and ctrl-a, n to go to the next. Voila.

Not only does it give you the ability to multiplex many windows inside of one terminal, you can "detach" and "reattach" the screen session. So, you ssh to your server somewhere, and open up a bunch of windows doing various things. Then, you decide to go drink beer at the pub, who just happens to have wireless, so you ssh from your laptop to the server, and reattach. Voila again. You're back working where you were, and you didn't have to quit everything you were doing and set it back up again later. A lot of people use this for irc, to avoid quitting and rejoining the network frequently. But it's useful for any interactive shells you'd like to pick back up later, possibly from a new location.

Whether you're already familiar with screen or just learning about it, here's a cool tip. Put the following in your ~/.screenrc:

hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %=%D %M %d %c"
hardstatus string '%{= kK}%-Lw%{= KW}%50>%n%f %t%{= kK}%+Lw%< %{=kG}%-= %d%M %c:%s%{-}'
You can fiddle around with the control codes to change the colors, if you'd like. See the screen man-page for info on that.

This will give you a screen status line at the bottom of your terminal, showing the names of all your virtual windows, which one was previously active (for ctrl-a, ctrl-a flipping), and will show the currently active window name. This is really handy, especially if you're like me and have anywhere from 5 to 30 windows open in various screen sessions.

Here's my full screenrc:

# eater's elite .screenrc

shelltitle ''
vbell on
autodetach on
startup_message off
defscrollback 2048

hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %=%D %M %d %c"
hardstatus string '%{= kK}%-Lw%{= KW}%50>%n%f %t%{= kK}%+Lw%< %{=kG}%-= %d%M %c:%s%{-}'
The shelltitle is important. Otherwise all new windows will display a default title of "bash" (usually) and clutter up your elite new status bar. You can rename a window using ctrl-a, A.

With these additions, my status bar looks something like this: 0$ efnet 1$ svn 2$ foo.pl 3-$ blog.txt "efnet" is the current because it's hilighted. "blog.txt" was the previous window because it's marked with the "-", so I can type ctrl-a, ctrl-a to flip back to it easily. If I want to change to "foo.pl", I can type ctrl-a, 2.

This makes it very easy to transition between many different windows, without the overhead of alternative approaches like tabbed-terminals or multiple instances of your terminal emulator.

Eater. Saturday, June 10, 2006

Power Sessions with Screen Linux Journal Re: Changing escape key sequence for screen.

Submitted by Anonymous on Thu, 2003-12-18 02:00. I personally favor

escape ^Tt

because transpose-chars is a command I've used maybe twice in nearly a decade of Emacs, and everything else is bound to more useful things.

Re: Changing escape key sequence for screen.

Submitted by Anonymous on Thu, 2003-01-02 02:00.

Between normal shell escapes and emacs navigation keys, many of the basic ctl-keys are pretty well utilized.

Ctrl-Z for me is critical for suspending processes.

I prefer, 'escape ^Gg' since who really wants to generate a random bell anyway :)

Re: Changing escape key sequence for screen.

Submitted by Anonymous on Mon, 2004-02-09 02:00.

Far better is to use vi which doesn't require the use of control/meta keys!

Re: Changing escape key sequence for screen.

Submitted by Anonymous on Mon, 2003-08-25 01:00.

C-g is also critical for canceling commands... |

Re: Changing escape key sequence for screen.

Submitted by Anonymous on Mon, 2003-08-25 01:00.

Alternatives include:

escape ^Oo (C-o opens a new line in emacs) escape ^Pp (C-p moves the cursor to the previous line)

Re: Changing escape key sequence for screen.

Submitted by Anonymous on Wed, 2004-07-07 01:00.

Five years ago my screen escape and literal command characters of choice for Emacs noninterference:

escape "^^^^"

Using Ctrl-^ was a bit awkward but I got used to it. If I were using screen as much nowadays I'd probably choose a different character, maybe even a function key.

The first thing I looked for

Submitted by sqweek (not verified) on Mon, 2005-08-29 03:24.

The first thing I looked for when I started using screen was an option to change the escape key - I didn't fancy having to hit C-a a to move to the start of the line. After thinking about it for a while, I came up with this: escape `\' Which I'm a big fan of. For some reason hitting ` ' to get a backquote just feels intuitive (though it might help that I use dvorak so ' is where q is on qwerty).

Examples

A simple .screenrc which includes opening of several predefined windows

More .screenrc fun (3.00 / 7) (#121) by fn0rd on Thu Mar 11, 2004 at 11:03:58 AM EST #kill startup message startup_message off

# define a bigger scrollback, default is 100 lines defscrollback 1024

# on Debian backspace should send char `177': bindkey -k kb stuff "177"

# An alternative hardstatus to display a bar at the bottom listing the # windownames and highlighting the current windowname in blue. (This is only # enabled if there is no hardstatus setting for your terminal) hardstatus on hardstatus alwayslastline hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

# -------------------------------------------------------------------------- # STARTUP SCREENS # --------------------------------------------------------------------------

# Example of automatically running some programs in windows on screen startup. # Use the form: screen [-flag] [window name] [window number] [program to run in window] # The -t flag means that the window in which that program is running # closes when you exit that program, so if you quit pine # window 2 closes.

screen bash screen -t emacs 1 emacs screen -t mail 2 pine screen -t slashdot 3 lynx http://www.slashdot.org/ screen -t k5 4 lynx http://www.kuro5hin.org/ screen -t bar 5 ssh foo@bar

# I cribbed most of this from /etc/screenrc # Check it out on your own to learn more about keybindings and whatnot.

Tim Chambers's master screenrc

You run an "outer" screen session (the "slave" session) that in turn runs an "inner" (or "master") session. You use the regular escape sequence (Ctrl-A d) to detach from the master, and you map Ctrl-^ to be the control key for the slave session. If you press Ctrl-^ while using screen this way, you'll see one process in the slave session. It's running ssh-agent. That's the key to using ssh with screen. The slave's only purpose is to run ssh-agent. The master runs as a child of that. Consequently, all shells in the master session are running under the ssh-agent. Just run ssh-add from any master shell, and then all shells have your ssh identity. He explain the method in his Life Journal blog entry tbc GNU screen and SSH
###
# Author: Tim Chambers                               http://alum.mit.edu/www/tbc/
###
# This is http://alum.mit.edu/www/tbc/lib/screenrc.txt
# my .screenrc file.
# I explain it at http://purl.org/net/tbc/blog/4090.html
#
# To use it, copy it to ~/.screenrc
# *and* copy
# http://alum.mit.edu/www/tbc/lib/screenrc.slave.txt
# to ~/.screenrc.slave
### BEGIN Jason White comments
# My solution was to run screen inside of screen. This also works
# around the problem of screen splits being lost after
# detaching. What I do is create a screenrc file for a "master" and
# "slave" (or parent/child) screen session:
#
# --- .screeenrc.master ---
# activity ''
# autodetach on
# bell ''
# bind K
# bind k
# bind ^k
# bind \\
# bind ^x
# bind r
# bind ^r
# bind x remove
# bind q only
# bind f fit
# #bindkey -d ^R focus down
# bind \\ resize
# bind | resize =
# bind - resize -1
# bind + resize +1
# bind = resize +1
# bind { resize -3
# bind } resize +3
# chdir
# escape ^^^^
# deflogin on
# vbell off
#
# screen ssh-agent screen -S slave -m -c /home/jdwhite/.screenrc.slave
# --- End .screenrc.master --
#
# Note: "master" screen's escape character gets set to ^^ which is
# one of the few remaining control key sequences one can input from
# the keyboard and, more importantly, one I don't use. We'll see
# why later.
#
# This will invoke the "slave" screen process with it's own
# .screenrc file. The slave screenrc file is where you'd transfer
# your existing .screenrc contents to. It contains more or less the
# same stuff as the master's file, but with the following
# additions/alterations:
#
# -- Begin partial .screenrc.slave --
# bind d exec screen -d master
# bind ^d exec screen -d master
# -- End partial .screenrc.slave --
#
# Binding these keys will make the stock detach keys in the "slave"
# session detach the "master" screen process instead of the
# "slave". This is why we have to name the sessions with '-S'. The
# only slight change you'll sometimes have to make when you want to
# remotely detach and reattach to another shell is to specify the
# name of the session:
#
# % screen -d -r master
#
# -Jason
#
# --
# Jason White
# http://www.jdwhite.org/~jdwhite
### END Jason White comments
# (Note I want screen to identify as xterm. This is so the xterm
# window title escape sequence works. If you don't like it,
# remove "-T xterm" from both the slave invocation in this file and
# the master invocation from your command line.)

# Then all you do is invoke it like this:
# $ screen -S master -T xterm
# Use ^Ad to detatch, as usual.
# Re-attach using this:
# $ screen -d -r master -T xterm
#

# so this is all I want now
height 24
startup_message off

# and this is the magic
escape ^^^^
screen ssh-agent screen -T xterm -S slave -m -c /home/tbc/.screenrc.slave

Tim Chamber's slave screenrc

###
# Author: Tim Chambers <[email protected]> http://alum.mit.edu/www/tbc/
###
# This is http://alum.mit.edu/www/tbc/lib/screenrc.slave.txt
#
# I explain it at http://purl.org/net/tbc/blog/4090.html
#
# To use it, copy it to ~/.screenrc.slave
# *and* copy
# http://alum.mit.edu/www/tbc/lib/screenrc.txt
# to ~/.screenrc
######################
bind d exec screen -d master
bind ^d exec screen -d master

# so this is all I want now (tbc, 08/20/03)
height 24

Another example

#
# Example of a user's .screenrc file
#

# This is how one can set a reattach password:
# password ODSJQf.4IJN7E  # "1234"

# no annoying audible bell, please
vbell on

# detach on hangup
autodetach on

# don't display the copyright page
startup_message off

# emulate .logout message
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# advertise hardstatus support to $TERMCAP
# termcapinfo  * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'

# make the shell in every window a login shell
#shell -$SHELL

# autoaka testing
# shellaka '> |tcsh'
# shellaka '$ |sh'

# set every new windows hardstatus line to somenthing descriptive
# defhstatus "screen: ^En (^Et)"

defscrollback 1000

# don't kill window after the process died
# zombie "^["

# enable support for the "alternate screen" capability in all windows
# altscreen on

################
#
# xterm tweaks
#

#xterm understands both im/ic and doesn't have a status line.
#Note: Do not specify im and ic in the real termcap/info file as
#some programs (e.g. vi) will not work anymore.
termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l

#80/132 column switching must be enabled for ^AW to work
#change init sequence to not switch width
termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

# Make the output buffer large for (fast) xterms.
#termcapinfo xterm* OL=10000
termcapinfo xterm* OL=100

# tell screen that xterm can switch to dark background and has function
# keys.
termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'

# special xterm hardstatus: use the window title.
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'

# emulate part of the 'K' charset
termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'

# xterm-52 tweaks:
# - uses background color for delete operations
termcapinfo xterm* be

################
#
# wyse terminals
#

#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff")
#essential to have it here, as this is a slow terminal.
termcapinfo wy75-42 xo:hs@

# New termcap sequences for cursor application mode.
termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J

################
#
# other terminals
#

# make hp700 termcap/info better
termcapinfo  hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'

# Extend the vt100 desciption by some sequences.
termcap  vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC
termcapinfo linux C8
# old rxvt versions also need this
# termcapinfo rxvt C8


################
#
# keybindings
#

#remove some stupid / dangerous key bin#39;K' kill
bind 'I' login on
bind 'O' login off
bind '}' history

# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
register [ "\033:se noai\015a"
register ] "\033:se ai\015a"
bind ^] paste [.]

################
#
# default windows
#

# screen -t local 0
# screen -t mail 1 mutt
# screen -t 40 2 rlogin server

# caption always "%3n %t%? @%u%?%? [%h]%?%=%c"
# hardstatus alwaysignore
# hardstatus alwayslastline "%Lw"

# bind = resize =
# bind + resize +1
# bind - resize -1
# bind _ resize max
#
# defnonblock 1
# blankerprg rain -d 100
# idle 30 blanker

screenrc

# Phil!'s .screenrc

# Easier than remembering to always run from non-X
unsetenv DISPLAY
# Likewise, for charset
setenv LC_CTYPE en_US.UTF-8

# Add stuff to xterm (and cousins) title bars.  This is a moderate abuse of the
# hardstatus feature--it just puts the hardstatus stuff into an xterm title
# bar.
termcapinfo xterm*|Eterm|mlterm 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
defhstatus "screen  (t) | $USER@H"
hardstatus off

# 256 color xterm
attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce "on"

# Fix broken termcap for my 3151 so bold text is closed properly.  Also
# translate from ISO-8859-1 into the CP437 that the terminal displays.
termcapinfo ibm3151 me=\E4@
termcapinfo ibm3151 XC=B%,\307\200,\374\201,\351\202,\342\203,\344\204,\340\205,\345\206,\347\207,\352\210,\353\211,\350\212,\357\213,\356\214,\354\215,\304\216,\305\217,\311\220,\346\221,\306\222,\364\223,\366\224,\362\225,\373\226,\371\227,\377\230,\326\231,\334\232,\242\233,\243\234,\245\235,\341\240,\355\241,\363\242,\372\243,\361\244,\321\245,\252\246,\272\247,\277\250,\254\252,\275\253,\274\254,\241\255,\253\256,\273\257,\337\341,\265\346,\261\361,\367\366,\260\370,\267\372,\262\375,\240\377,\244?,\246?,\247?,\250?,\251?,\255?,\256?,\257?,\263?,\264?,\266?,\270?,\271?,\276?,\300?,\301?,\302?,\303?,\310?,\312?,\313?,\314?,\315?,\316?,\317?,\320?,\322?,\323?,\324?,\325?,\327?,\330?,\331?,\332?,\333?,\335?,\336?,\343?,\360?,\365?,\370?,\375?,\376?

# Give me some info at the bottom of the screen.  Since hardstatus is in use by
# the above xterm title hack, the only source of information left is the
# caption that normally only gets displayed if you have split windows.
# e.g.:
# 11:50|Mon|Jan 06|aragorn f  3$ mutt  4$ centericq  5$* less  6-&!$ man  7$ xe
# (Current window is in reverse bold.)
# See bottom of file for more complete description.
caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"

# Make screen messages stand out a little more - black on bright green.
sorendition "+b kG"

# Variants on Sven's custom messages.
activity "%c activity -> %n%f %t"
bell "%c bell -> %n%f %t^G"
vbell_msg " *beep* "

# I know about screen.  I don't need to see it every time I start the program.
# (Which is, admittedly, rarely.)
startup_message off
# Log new screen windows in utmp.
deflogin on
# Never, ever turn this off.
autodetach on
# Just in case it isn't clear...
shell zsh
# I like to hear the beep.
vbell off
# Keep dead windows around until I tell them to exit.
zombie cr
# And show the command for the windows when they're resurrected.
verbose on
# Escape key is C-z.  (I use C-a too much in Emacs.)
escape ^zz
# I like a large scrollback
defscrollback 5000
# Run everything in UTF-8.
defutf8 on
# If a window goes unresponsive, don't block the whole session waiting for it.
nonblock on

# Use the function keys to switch among windows.
bindkey -k k1 select 1
bindkey -k k2 select 2
bindkey -k k3 select 3
bindkey -k k4 select 4
bindkey -k k5 select 5
bindkey -k k6 select 6
bindkey -k k7 select 7
bindkey -k k8 select 8
bindkey -k k9 select 9
bindkey -k k; select 10
bindkey -k F1 select 11
bindkey -k F2 select 12
# windows 13-24 are Shift-Fn.  May not work in all terminals.
bindkey -k F3 select 13
bindkey -k F4 select 14
bindkey -k F5 select 15
bindkey -k F6 select 16
bindkey -k F7 select 17
bindkey -k F8 select 18
bindkey -k F9 select 19
bindkey -k FA select 20
# screen only seems to understand up to FA.
#bindkey -k FB select 21
#bindkey -k FC select 22
#bindkey -k FD select 23
#bindkey -k FE select 24

# select works on window names, too.  This gives me the first window with a
# free shell.
bind s select zsh

# Make shift-PgUp and shift-PgDn work like they do in xterm.  (Note that this
# requires xterm to be configured to pass those keys through, and not try to
# act on them itself.)
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d

# Window numbering starts at 1, not 0.
bind c screen 1
bind 0 select 10

# Login toggle is too close to screen redraw.  How about explicitly setting
# login state, anyway?
bind 'L'
bind 'I' login on
bind 'O' login off

# It's sometimes useful to have a quote key.
bind ^Q mapdefault
bind q mapdefault

# And since that leaxes xon unbound, let's remove xoff, too.
bind ^S

# Using tab to move around regions gets annoying.  These help.
bind ^j focus down
bind ^k focus up
bind ^t focus top
bind ^b focus bottom

# More fixes for the IBM 3151.  Force the terminal's backspace (^H) to generate
# the required ^?.  (This renders ^H unusable for help from the terminal.)
bindkey -k kb stuff "\177"

# This lets me use specific commands from screen escape sequences.
multiuser on
aclchg :window: +x select

source ${HOME}/.screenrc-${HOST}


# caption description:
# caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"
#
# Anything I don't describe is treated literally.
#
# %?        - Start of a conditional statement.
#  %F       - Use this part of the statement if the window has focus (i.e. it
#             is the only window or the currently active one).
#  %{-b bc} - Turn off bold, blue foreground, cyan background.
# %:        - else
#  %{-b bb} - Turn off bold, blue foreground, blue background (this obscures
#             the text on non-focused windows and just gives a blue line).
# %?        - End conditional statement.
#  %C       - time (hh:mm, leading space) in 12 hour format
#  %D       - Three-letter day-of-week appreviation
#  %M       - Three-letter month appreviation
#  %d       - Day of the month
#  %H       - hostname
#  %?       - Start of conditional statement.
# %F      - Use this part of the statement if the window has focus.
# %{+u wb}  - underlined, white foreground, blue background
#  %?       - End conditional (if not focused, text remaind blue on blue).
#  %L=    - truncation/padding point.  With the 'L' qualifier, basically
#             just acts as a reference point.  Further truncation/padding is
#             done relative to here, not the beginning of the string
#  %-Lw   - window list up to but not including the current window (-),
#             show window flags (L)
#  %45>   - truncation/padding marker; place this point about 45% of the
#             way into the display area (45)
#  %{+b by} - add bold (still underlined from before), blue foreground,
#             yellow background
#    %n   - number of the current window
#    %f   - flags for current window
#    %t   - title of current window
#  %{-}   - undo last color change (so now we're back to underlined white
#             on blue)  (technically, this is a pop; a second invocation
#             would drop things back to unadorned blue on cyan)
#  %+Lw   - window list from the next window on (-), show window flags (L)
#  %-0<   - truncation/padding point.  Place this point zero spaces (0)
#             from the right margin (-).

jinome.stanford.edu

# GNU Screen configuration file
#
# Balaji S. Srinivasan <balajis_at_stanford_dot_edu>
# This file can be found at http://jinome.stanford.edu/stat366/unix/.screenrc
# Modified to play well with emacs, by moving Ctrl-A to Ctrl-T


# Modification of original files by Sven Guckes, Sarunas Vancevicius, and Mike Perry
# Sarunas Vancevicius original: http://www.redbrick.dcu.ie/~svan/configs/screenrc
# Mike Perry original:  http://fscked.org/writings/225notes/unix/.screenrc

#shell bash
###shell -$SHELL  #you can change OS X default shell to bash with the command "chsh -s bash"...
#terminfo xterm-color  #this keeps the coloring good; if the $TERM variable is not set explicitly, it is set to "screen"
	            #while apple's default is xterm-color. This messes up the color scheme significantly...

#term xterm-color  #I modified this in the /etc/bashrc file to keep syntax highlighting intact in emacs

markkeys "h=^B:l=^F:$=^E"  #this should give emacs style keybindings during copy mode movement in screen

autodetach           on            # default: on
crlf                off           # default: off
deflogin            off           # default: on
# defsilence          off           # default: off
hardcopy_append     on            # default: off
# nethack             on            # default: off
startup_message     off           # default: on
vbell               off           # default: ???
escape	"^Tt"  #the default of A interferes with emacs keybindings for terminal, and I never use the emacs transpose command
###nonblock on  #means that the whole window doesn't hang if an individual doesn't
#zombie cr #keep dead windows around till told to exit
#verbose on #show command for windows when they're resurrected
defutf8 on #run everything in unicode, to allow display of international characters w/o problems

# ===============================================================
# VARIABLES - Number values
# ===============================================================
  defscrollback       10000          # default: 100
# msgminwait          3             # default: 1
  silencewait         15            # default: 30

# Hardstatus line at bottom of screen
#hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< "
#hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %=[%c, %D, %d/%m/%y]"
#hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %=[%c:%s, %D, %d/%m/%y]"

# "sorendition": set the colors for
# the "messages" and "text marking"
# (ie text you mark in copy mode):

sorendition "+b kG"
#sorendition 10 99 # default, blue highlighting of active, black background, white text

#sorendition 02 34  # yellow on blue
# sorendition 02 40 # green  on black
# sorendition 02 34 # yellow on blue
# sorendition  rw # red  on white
# sorendition  kG # black  on bold green

##setenv DISPLAY ''
activity            "activity in %n (%t) [%w:%s]~"
# bell:       This message *includes* a "beep" with '~'.
bell                "bell   in %n (%t) [%w:%s]~"

#Change keybindings for convenience
bind ^Q mapdefault  #these two allow the use of a quote key (?)
bind q mapdefault
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
#bind esc
bind ''
bind 'L' #don't want to use login when using screen redraw
#make them better
#bind '\\' quit
#bind 'K' kill
bind 'I' login on
bind 'O' login off
bind '}' history
bind ^a
#bindkey "^[w" command
# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
#register [ "\033:se noai\015a"
#register ] "\033:se ai\015a"
#bind ^] paste [.]

# aterm bindings                                                            bindkey "Oc" next
bindkey "Od" prev

#easy switching of windows without p/n confusion, as ctrl-p and ctrl-n are frequently used in emacs but u/j are not...
#bind '^u'
#bind '^j'
bind 'u' prev
bind ^U prev
bind 'j' next
bind ^J next

#allow use of emacs-ish keybindings to move around regions
# Using tab to move around regions gets annoying.  These help.
bind ^P focus up
bind 'p' focus up
bind ^N focus down
bind 'n' focus down
bind ^F focus top
bind 'f' focus top
bind ^B focus bottom
bind 'b' focus bottom



#bindkey ^[0 select `
#bindkey ^[1 select 1
#bindkey ^[2 select 2
#bindkey ^[3 select 3
#bindkey ^[4 select 4
#bindkey ^[5 select 5
#bindkey ^[6 select 6
#bindkey ^[7 select 7
#bindkey ^[8 select 8
#bindkey ^[9 select 9


#================================================
# A bunch of hardstatus lines, Choose one that you like.
# Taken from a bunch of config files that I could find,
# while trying to find the *perfect* hardstatus line.
#================================================

# ===============================
# Hardstatus Line and sorendition
# ===============================
# hardstatus: Always show the window list in the last line:
# hardstatus alwayslastline "%w"
#
# This will show the current time and today's date in YYmmdd, too:
#hardstatus alwayslastline " %c | %Y%m%d |  %w"
#
# Same as the previous - but with COLOR! :-)
# hardstatus alwayslastline "\033[m\033[42;30m %m%d \033[m \033[42;30m%c\033[m \033[42;30m %w \033[m"
# hardstatus alwayslastline " %m%d \033[42;30m%c\033[m \033[42;30m %w \033[m"
#hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#hardstatus lastline "[%D, %d/%m/%y %C %a]  %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#hardstatus alwayslastline "[%D,%c]  %-Lw%{= RW}%50>%n%f* %t%{-}%+Lw%<"

#caption always "%{= kc}%?%-Lw%?%{= kY}%n*%f %t%?(%u)%?%{= kc}%?%+Lw%?"
#caption always '%{= wb}%50=%n%f %t%{= wb}'
#caption always '%{= wb}%50=%n%f %t%{= wb}'
#caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#hardstatus alwayslastline " %m%d %c \033[42;30m %w \033[m"

#caption always "%>%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?%<"

#[20:58:40]
#hardstatus alwayslastline "[%c:%s, %D, %d/%m/%y] %w"
#hardstatus alwayslastline "[%c:%s, %D, %d/%m/%y] %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#hardstatus alwayslastline "[%D, %d/%m/%y %C %a]  %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
# caption always "%{kG}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kG}%?%+Lw%?"
# caption always "%{=}%{+b kR}%H %{+b kY}%M %d %{+b kG}%2c %{+b kB}%?%-Lw%?%{+b kW}%n*%f %kt%?(%u)%?%{+bkB}%?%+Lw%? | %{kR} Load: %l %{kB}"

# hardstatus alwayslastline "%H %w"
# example by Adam Spiers <[email protected]> :
# *without* colors:
# hardstatus alwayslastline "%?%-Lw%?%n*%f %t%?(%u)%?%?%+Lw%?"
# *with* colors:
#
# This will show the current time and today's date in YYmmdd, too:
# hardstatus alwayslastline " %c | %Y%m%d |  %w"
#
# This will show today's date in mmdd and the current time, too:
# hardstatus alwayslastline " %m%d %c |  %w"
#
# hardstatus alwayslastline " [ %H ] %{wb} %c:%s | %d.%m.%Y %{wr} Load: %l %{wb} %w "
# hardstatus alwayslastline " %H %{wb} %c:%s | %d.%m.%Y %{wr} Load: %l %{wk} %w "
#hardstatus alwayslastline "%{bw}%1`%= %{+b ky}| %c:%s |%{+b rw} ip: %2` | vpn: %3`"
#                                |                        |        |
#                                heise (script in ~/bin/) |        ipadr_vpn (script in ~/bin/)
#                                                           |
#                                                           ipadr (script in ~/bin/)
#
# note: the use of ANSI color sequences is deprecated.
#     please upgrade to (at least) screen 3.9.13
#     so you can make use of the color letters/names!

#From: www.zsh.org/mla/workers/2000/msg03990.html
#hardstatus off
#hardstatus string "%H - %n:%t%? - %h%?"
#hardstatus alwayslastline "%H - %n:%t%? - %h%?"
#hardstatus alwayslastline "%n:%h%?"  #this is window number, login@hostname, and current directory
#hardstatus alwayslastline "%w%n:%h%?"  #this is window number, login@hostname, and current directory
#hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %h%?%{-}%+Lw%<"

#termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
#caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"
#hardstatus alwayslastline "%= %-Lw *%n%h %t %+Lw %="
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< "

#Window numbering starts at 1, not 0
#bind c screen 1
#bind 0 select 10

# caption description:
# caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"
#
# Anything I don't describe is treated literally.
#
# %?        - Start of a conditional statement.
#  %F       - Use this part of the statement if the window has focus (i.e. it
#             is the only window or the currently active one).
#  %{-b bc} - Turn off bold, blue foreground, cyan background.
# %:        - else
#  %{-b bb} - Turn off bold, blue foreground, blue background (this obscures
#             the text on non-focused windows and just gives a blue line).
# %?        - End conditional statement.
#  %C       - time (hh:mm, leading space) in 12 hour format
#  %D       - Three-letter day-of-week appreviation
#  %M       - Three-letter month appreviation
#  %d       - Day of the month
#  %H       - hostname
#  %?       - Start of conditional statement.
# %F      - Use this part of the statement if the window has focus.
# %{+u wb}  - underlined, white foreground, blue background
#  %?       - End conditional (if not focused, text remaind blue on blue).
#  %L=    - truncation/padding point.  With the 'L' qualifier, basically
#             just acts as a reference point.  Further truncation/padding is
#             done relative to here, not the beginning of the string
#  %-Lw   - window list up to but not including the current window (-),
#             show window flags (L)
#  %45>   - truncation/padding marker; place this point about 45% of the
#             way into the display area (45)
#  %{+b by} - add bold (still underlined from before), blue foreground,
#             yellow background
#    %n   - number of the current window
#    %f   - flags for current window
#    %t   - title of current window
#  %{-}   - undo last color change (so now we're back to underlined white
#             on blue)  (technically, this is a pop; a second invocation
#             would drop things back to unadorned blue on cyan)
#  %+Lw   - window list from the next window on (-), show window flags (L)
#  %-0<   - truncation/padding point.  Place this point zero spaces (0)
#             from the right margin (-).

www.benedikt-wildenhain.de

# Diese Konfigurationsdatei ist freie Software; Sie koennen sie nach den
# Bestimmungen der GPL Version 2 oder (wenn Sie wollen) einer beliebigen
# spaeteren Version der, von der Free Software Foundation
# veroeffentlichten, GNU General Public License benutzen und modifizieren.
# Abgeleitet von Sven Guckes <guckes-screen AT math.fu-berlin.de> .screenrc
# Bearbeitet von Kurt Gramlich <kurt.gramlich AT lugrav.de> und
# Benedikt Wildenhain <benedikt.wildenhain  AT elug.de>
# Aktuelle Version: http://www.benedikt-wildenhain.de/.screenrc

# Hinweis: wer nicht so paranoid ist und fuer Browser + irc eigenen
# Accounts benutzt (wegen moeglichen Exploits) muss die sudo Aufrufe
# vorher entfernen

  autodetach          on            # Standard: on
  crlf                off           # Standard: off
  deflogin            off           # Standard: on
  hardcopy_append     on            # Standard: off
  startup_message     off           # Standard: on
  vbell               off
  defscrollback       1000          # Standard: 100
  silencewait         15            # Standard: 30

  shell               bash

  hardstatus          alwayslastline " %d-%m-%y %c | %w"
  sorendition         02 40
  activity            "activity in %n (%t) [%w:%s]~"
  bell                "Stoerenfried in %n (%t) [%w:%s]~"
  vbell_msg           " *Ruhe!* "
  bind h hardcopy
  bind P paste        .
  bind ~ activity     "activity in %n (%t) [%w:%s]~"
  bind * activity     "activity in %n (%t) [%w:%s]"

  bind E screen -t 'mail'  1 mutt
  bind G screen -t 'Google'  sudo -u insec links www.google.com
  bind l screen -t 'lugrav'  2 sudo -u insec links http://www.lugrav.de/
  bind e screen -t 'elug'  3 sudo -u insec  links http://www.elug.de/
  bind m screen -t 'mc'    4 mc
  bind V screen -t 'vim'   5 vim
  bind T screen -t 'HeiseTicker' sudo -u insec links www.heise.de/

  bind N screen -t 'Notizen' bash -c "date \"+%n--- --- --- %d-%m-%Y-%H:%M --- --- ---%n%n\" >> $HOME/.todo; vim -c %%\'$|startinsert!\' $HOME/.todo"

#  encoding utf8 iso8859-15

# ===============================================================
# Befehlsuebersicht
# ===============================================================
#
# acladd <usernames>
# aclchg <username> <permbits> <list>
# acldel <username>
# acldel does not allow a list of usernames?
# activity <message>
# allpartial [on|off]
# at [identifier][#|*|%] command [args ... ]
# autodetach [on|off]
# autonuke [on|off]
# bell <message>
# bind <key> [command [args]]
# bindkey [-d] [-m] [-a] [[-k|-t] <string> [<cmd> <args>]
# break [<duration>]
# bufferfile [exchange-file]
# c1 [on|off]
# charset <set>
# chdir [<directory>]
# clear
# colon [<prefix>]
# The manual does not tell you what the "prefix" is for.  :-(
# command
# console [on|off]
#"console on" just tells me "don't know how to grab console".  :-(
# copy
# "copy" enters the copy mode - one of the most useful things with screen.
# It allows you to access the current window and its scrollback buffer,
# search for some text and copy it to the default buffer.  You can then
# put its contents into a file or paste it into another window.  Great!
# copy_reg [key]
#'copy_reg' "No longer exists, use "readreg" instead!"
# crlf [on|off]
#'crlf' gives no visible feedback.  Bad!
# debug on|off
#
# "def" commands - they set "default values" for further windows:
# defautonuke [on|off]
# defc1 [on|off]
# defcharset [<set>]
# defescape <xy>
# defflow on|off|auto [interrupt]
# defgr [on|off]
# defhstatus [<status>]
# defkanji [jis|sjis|euc]
# deflogin [on|off]
# defmode <mode>
# defmonitor [on|off]
# defobuflimit <limit>
# defscrollback <num>
# defwrap [on|off]
# defwritelock on|off|auto
# defzombie <[keys>]
#'defzombie' -> "unknown command 'defzombie'".  Not implemented, maybe?
#
# detach
# digraph [<preset>]
# dumptermcap
# echo [-n] <message>
# escape <xy>
# exec [[fdpat] newcommand [args ...]]
# I need some more examples for 'exec' - send them!
#
# flow [on|off|auto]
# gr [on|off]
# hardcopy
# hardcopy_append [on|off]
# hardcopydir <directory>
# hardstatus [on|off]
# height [<lines>]
# help
# history
# info
# ins_reg <[key>]
# kanji jis|euc|sjis [jis|euc|sjis]
# kill
#
# lastmsg
# license
# lockscreen
# log [on|off]
# logdir directory
# logfile <filename>
# login [on|off]
#
# mapdefault
# mapnotnext
# maptimeout <[timo>]
# markkeys <string>
# meta
# monitor [on|off]
# msgminwait <sec>
# msgwait <sec>
# multiuser [on|off]
#
# nethack [on|off]
# next
# number [<n>]
# obuflimit [<limit>]
# other
#
# partial [on|off]
# password [<crypted_pw>]
# paste [<registers> [<dest_reg>]]
# pastefont [on|off]
# pow_break
# pow_detach
# pow_detach_msg <message>
# prev
# print_cmd [<cmd>]
# process [<key>]
#
# quit
#
# readbuf
# redisplay
# register key string
# removebuf
# reset
# screen [-opts] [n] [cmd [args]]
# scrollback num
# select [n]
# sessionname [name]
# setenv [var [string]]
# shell command
# shelltitle title
# silence [on|off|sec]
# silencewait sec
# sleep num
# slowpaste usec
# startup_message on|off
# suspend
# term term
# termcap term terminal-tweaks [window-tweaks]
# terminfo term terminal-tweaks [window-tweaks]
# time
# title [windowalias]
# unsetenv var
# vbell on|off
# vbell_msg message
# vbellwait sec
# version
# wall message ...
# width [num]
# windows
# wrap [on|off]
# writebuf
# writelock [on|off|auto]
# xoff
# xon
# zombie [key][key]

search

# Example of a user's .screenrc file
#

# This is how one can set a reattach password:
# password ODSJQf.4IJN7E  # "1234"

#console off
crlf off
defc1 off
defautonuke off
defbce off
deflogin on
defmonitor on
msgminwait 3
msgwait 5
vbell off
allpartial off
defwrap on
msgminwait 2
msgwait 2
multiuser off

idle 1800 lockscreen

# detach on hangup
autodetach on

# don't display the copyright page
startup_message off

# emulate .logout message
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# advertise hardstatus support to $TERMCAP
# termcapinfo  * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'

#term vt102

# make the shell in every window a login shell
shell -/bin/bash
#-$SHELL
shelltitle '$ |sh'

# autoaka testing
# shellaka '> |tcsh'
# shellaka '$ |sh'

# set every new windows hardstatus line to somenthing descriptive
# defhstatus "screen: ^En (^Et)"

defscrollback 200

# don't kill window after the process died
# zombie "^["

# enable support for the "alternate screen" capability in all windows
# altscreen on

################
#
# xterm tweaks
#

#xterm understands both im/ic and doesn't have a status line.
#Note: Do not specify im and ic in the real termcap/info file as
#some programs (e.g. vi) will not work anymore.
#termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
#terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l

#80/132 column switching must be enabled for ^AW to work
#change init sequence to not switch width
#termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

# Make the output buffer large for (fast) xterms.
#termcapinfo xterm* OL=10000
#termcapinfo xterm* OL=100

# tell screen that xterm can switch to dark background and has function
# keys.
#termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
#termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'

# special xterm hardstatus: use the window title.
#termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
#termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'

# emulate part of the 'K' charset
#termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'

... ... ...


################
#
# keybindings
#

#remove some stupid / dangerous key bindings
#bind k
#bind ^k
#bind .
#bind ^\
#bind \\
#bind ^h
#bind h
#make them better
#bind 'K' kill
#bind 'I' login on
#bind 'O' login off
#bind '}' history
#bind 'e' screen news
#bind 'E' screen mutt
bind 'e' hstatus ""
# xon/xoff
bind s
bind ^s
bindkey ^A eval info mapdefault command
bindkey ^S hstatus "oha!"
# Umlaute und ß in UTF8: äöüßÄÖÜ
bindkey ¿ stuff äß
bindkey Ð stuff öß
bindkey ð stuff üß
bindkey ª stuff Äß
bindkey Æ stuff Öß
bindkey º stuff Üß


# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
#register [ "\033:se noai\015a"
#register ] "\033:se ai\015a"
#bind ^] paste [.]

################
#
# default windows
#

# screen -t local 0
# screen -t mail 1 elm
# screen -t 40 2 rlogin server

# caption always "%3n %t%? @%u%?%? [%h]%?%=%c"
# hardstatus alwaysignore
# hardstatus alwayslastline "%Lw"

# bind = resize =
# bind + resize +1
# bind - resize -1
# bind _ resize max
#
# attrcolor u "-u b"
# attrcolor b "R"

backtick 5 300 0 screen-gettemp.sh

# hardstatus alwayslastline "%-Lw%50>%n%f* %t%+Lw%<"
# at.linux:
#caption always "%{= kc}%H (system load: %l)%-21=%{= .m}%D %d.%m.%Y %0c"
#hardstatus alwayslastline "%{= kw}%-Lw%{= .g}%L>%n%h %t%{-}%+Lw%{= .g}%-6= %c"
hardstatus alwayslastline "%5` %{=r .}%-Lw%{= .}%L> %n%h %t %{-}%+Lw%-8=%{= .} %c  "

screenrc

By Sven Guckes
# ===============================================================
# File:               $HOME/.screenrc
# Purpose:            Setup file for program "(GNU) screen"
# written by:         Sven Guckes 
# Latest update:      Sat Feb 16 06:00:00 MET 2002
# Latest user version:  screen-3.9.11    [020215]
# Latest beta version:  screen-3.9.11beta6 [020206]
# Length and size:    450 lines and about 15 kilobytes
# ===============================================================
#
# ===============================================================
# SEE ALSO:
# ===============================================================
# SCREEN Pages:
# http://www.math.fu-berlin.de/~guckes/screen/
#
# Commands List (from the manual to screen-3.7.6):
# http://www.math.fu-berlin.de/~guckes/screen/commands.txt
#
# MailingList:
# http://www.yahoogroups.com/group/gnu-screen/
#
# ===============================================================
# ESCAPE - the COMMAND CHARACTER
# ===============================================================
# escape ^aa  # default
# escape ^pp  # suggested binding for emacs users
#
# ===============================================================
# STARTUP of programs in an extra window:
# ===============================================================
# Uncomment one/some following lines to automatically let
# SCREEN start some programs in the given window numbers:
#screen -t irssi			0 irssi
#screen -t mutt     1 mutt
# screen -t EDIT      2 vim
# screen -t GOOGLE    3 links http://www.google.com
# screen -t NEWS      4 slrn
# screen -t WWW       5 links http://www.math.fu-berlin.de/~guckes/
#
# ===============================================================
# VARIABLES - Boolean values (on/off)
# ===============================================================
  autodetach          on            # default: on
  crlf                off           # default: off
  deflogin            off           # default: on
# defsilence          off           # default: off
  hardcopy_append     on            # default: off
# nethack             on            # default: off
  startup_message     off           # default: on
# termcap  xterm      'AF=\E[3%dm:AB=\E[4%dm'
# terminfo xterm      'AF=\E[3%p1%dm:AB=\E[4%p1%dm'
# Matthias Kopfermann                               [020222]:
  termcapinfo linux "ve=\E[?25h\E[?17;0;64c" # red
  vbell               off           # default: ???
#
# ===============================================================
# VARIABLES - Number values
# ===============================================================
  defscrollback       3000          # default: 100
# msgminwait          3             # default: 1
  silencewait         15            # default: 30
#
# ===============================================================
# VARIABLES - Paths and Files (esp. programs)
# ===============================================================
# bufferfile: The file to use for commands
#             "readbuf" ('<') and  "writebuf" ('>'):
# bufferfile          $HOME/.screen_exchange
#
# hardcopydir:  The directory which contains all hardcopies.
# hardcopydir         ~/.hardcopy
# hardcopydir         ~/.screen
#
# shell:  Default process started in screen's windows.
# Makes it possible to use a different shell inside screen
# than is set as the default login shell.  Halleluja! :-)
# shell               zsh
 shell               bash
# shell               ksh
#
# ===============================================================
# VARIABLES - Strings
# ===============================================================

# some notes on COLOR before explaining its use in
# the commands caption, hardstatus, and sorendition.
#
# COLOR:  colors codes are combinations of
# [attribute modifier] [color description]
# the manual talks of "attribute/color modifiers".
# see the manual, section "STRING ESCAPES".
#
# Color table:
# 0 Black           .  leave color unchanged
# 1 Red             b  blue
# 2 Green           c  cyan
# 3 Brown / yellow  d  default color
# 4 Blue            g  green         b  bold
# 5 Purple          k  blacK         B  blinking
# 6 Cyan            m  magenta       d  dim
# 7 White           r  red           r  reverse
# 8 unused/illegal  w  white         s  standout
# 9 transparent     y  yellow        u  underline
#
# note: "dim" is not mentioned in the manual.
#
# ===========================================
# CAPTION - shows a "caption" for the window.
# ===========================================
# a "caption" is another line which can show information -
# in addition to the hardstatus line.
#
# use caption to show window list:
caption always "%{= kw}%?%-Lw%?%{+b kw}%n*%t%f %?(%u)%?%{= kw}%?%+Lw%?"


# caption always '%{= wb}%50=%n%f %t%{= wb}'
# this basically just shows the current window number and title
# on its own; the "%50=" displays it in the middle of the line.
#
# caption always "%>%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?%<"
# caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
# caption always "%?%F%{.RW}%?%3n %t%? [%h]%?"
# caption always "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
#
#  caption always "%{kG}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kG}%?%+Lw%?"
#
# "push right border: current time with seconds and current date"
# caption always "%=%c:%s %Y-%m-%d"
#
# Prints the window names and highlight the current window in yellow.
# On the right there is the time in green and the date in yellow.
#
#caption always "%?%{+b kw}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y"

#
# ===============================================================
#
# ===============================
# Hardstatus Line and sorendition
# ===============================
#
# Prints the window names and highlight the current window in yellow.
# On the right there is the time in green and the date in yellow.
#
#hardstatus alwayslastline "%?%{wk}%-Lw%?%{yK}%n*%f %t%?(%u)%?%?%{wk}%+Lw%? %{gk}%=%c %{yk}%d/%M/%Y"
hardstatus alwayslastline "%{+b kr}[ %H ] %{ky} Load: %l %-=%{kb} %c  %d.%m.%Y"

#hardstatus alwayslastline "%{+b kr}[ %H ] %{kw} Load: %l %-=%  %{kb} %c:%s  %d.%m.%Y "


# Colorize the "messages" and "text marking":
# Example:  Blue bg, white fg
 sorendition gK
#
# ============================
# Password
# ============================
# password SZnBqiqMtfa6k
# Do NOT remove the comment if
# you don't know what this does!
# (TODO describe the effect - obviously)
#
# ===============================================================
# Messages
# ===============================================================
# There are two kinds of messages:  "activity" and "bell"
# They are also the names of the commands that set the
# respective messages.  In every message there can be "meta
# strings" which are replaced by values.  A meta string starts
# with a percent sign and is then followed by one of the
# following letters: aAdDmMnstwWyY The meta strings refer to
# the current date and time or to a window title or number:
# %t - title
# %n - number (a single % still works)
# %d - day
# %D - weekday name
# %m - month
# %M - month name
# %y - year (2 digit)
# %Y - year (4 digit)
# %w - hour:minutes (24h format)
# %W - hour:minutes (12h format)
# %s - seconds
# %a - am/pm
# %A - AM/PM
# Older versions of screen used a single '%' character
# for window titles - but since version 3.7 this is
# obsoleted by '%n' and will vanish in future releases!
# So please update your screenrc to meet this convention!
#
# ===============================================================
# "~" stands for the "bell" character
#
# activity:   This message *includes* a "beep" with '~'.
  activity            "activity in %n (%t) [%w:%s]~"
#
# bell:       This message *includes* a "beep" with '~'.
  bell                "bell   in %n (%t) [%w:%s]~"
#
# pow_detach_msg:     Message shown when session
#                     gets power detached.
  pow_detach_msg      "BYE"
#
# vbell_msg:          Message shown when the
#                     "virtual bell" rings.
  vbell_msg           " *beep* "
#
# ==============================================================
#  BIND bind - defaults
# ==============================================================
# The "bind" command assign keys to (internal) commands
# SCREEN checks all the keys you type; you type the key
# which is known as the "command character" then SCREEN
# eats this key, too, and checks whether this key is
# "bound" to a command.  If so then SCREEN will execute it.
#
# The command "bind" allows you to chose which keys
# will be assigned to the commands.
#
# Some commands are bound to several keys -
# usually to both some letter and its corresponding
# control key combination, eg the command
# "(create) screen" is bound to both 'c' and '^C'.
#
# The following list shows the default bindings:
#
# break     ^B b
# clear     C
# colon     :
# copy      ^[ [
# detach    ^D d
# digraph   ^V
# displays  *
# dumptermcap .
# fit       F
# flow      ^F f
# focus     ^I
# hardcopy  h
# help      ?
# history   { }
# info      i
# kill      K k
# lastmsg   ^M m
# license   ,
# log       H
# login     L
# meta      x
# monitor   M
# next      ^@ ^N sp n
# number    N
# only      Q
# other     ^X
# pow_break B
# pow_detach  D
# prev      ^H ^P p ^?
# quit      \
# readbuf   <
# redisplay ^L l
# remove    X
# removebuf =
# reset     Z
# screen    ^C c
# select    " '
# silence   _
# split     S
# suspend   ^Z z
# time      ^T t
# title     A
# vbell     ^G
# version   v
# width     W
# windows   ^W w
# wrap      ^R r
# writebuf  >
# xoff      ^S s
# xon       ^Q q
# ^]  paste .
# - select -
# 0 select 0
# 1 select 1
# 2 select 2
# 3 select 3
# 4 select 4
# 5 select 5
# 6 select 6
# 7 select 7
# 8 select 8
# 9 select 9
# I login on
# O login off
# ] paste .
#
# FAQ: So many keys are bound to some command already -
#    which keys are unbound yet? Which are free for binding?
# A: SCREEN does not have a command to show you
#    a table of currently unbound keys - sorry!
#    You simply have to read this setup file. ;-)
#
#    Summary:  Here is a table of the keys
#    which are not bound by default:
#    unbound:  -B--E-G--J-L---P-R-TUV--Y-
#      bound:  A-CD-F-HI-K-MNO-Q-S---WX-Z
#
# And here are the default bind commands if you need them:
#
# bind A title
# bind C clear
# bind D pow_detach
# bind F fit
# bind H log
# bind I login on
# bind K kill
# bind L login
# bind M monitor
# bind N number
# bind O login off
# bind Q only
# bind S split
# bind W width
# bind X remove
# bind Z reset
#
# I suggest that you don't change the bidnings for
# 'H' ("log") and 'M' ("monitor") as they are really
# useful and you might want to use them a lot;
# in this case it is recommended to use
# the defaults to avoid confusion.
# personally, I use 'A' ("title") quite often, too.
#
# If you are using "split windows" already
# (this is not available in the latest user release yet)
# then you will also use the command
# associated with the keys FQSX a lot, too -
# so don't change their bindings!
#
# Anyway, I have bound the unbound uppercase letters
# to start programs in windows directly, ie without
# starting a new window with a shell within first.
# This simply saves shells and thus saves RAM -
# and also avoids that the title of a windows is
# the name of your shell.  Also, you need not "exit"
# from a shell when you are done with some program:
#
# ==============================================================
# BIND and the Services:
# ==============================================================
# I am using the uppercase letters to start programs/services:
#
 bind A title  # default!
#
# BUUG - Berlin Unix User Group - read some news about Unix
#  bind B screen -t 'buug' 4 links www.buug.de
#
# CHEM - LinuxTag event in Chemnitz -- 2002-03-09 + 2002-03-10
#  bind C screen -t 'CHEM' 9 links www.tu-chemnitz.de/linux/tag/
# NOTE:  This overrides the default binding for the "clear" command.
#
# DICT - Dictionary English<->German
# bind D pow_detach !
#  bind D screen -t 'DICT' 4 links dict.tu-chemnitz.de
# Note: this overrides the default binding for the
# command "pow_detach".  I hardly ever use that one.
#
# MUTT - Email User Agent
#  bind E screen -t 'mail' 0 mutt
# I use email quite a lot - so window #0 is reserved for that.
# see also:  http://www.math.fu-berlin.de/~guckes/mutt/
#
# FTP - File Transfer "Program"
# bind F fit # default!
# bind F screen -t 'ftp' 9 ncftp
# see also:  http://www.math.fu-berlin.de/~guckes/ncftp/
#
# GOOGLE - Web Search Engine
  bind ^g  screen -t 'Google' links www.google.com
#
# HEISE - IT NewsTicker
# bind H log # default!
#  bind H screen -t HeiseTicker links www.heise.de
# NOTE: This overrides the default binding of the "hardcopy" command!
#
# IRC - International Relay Chat
# bind I screen -t 'irc'  5 irc
# bind I screen -t 'icq'  9 micq
# see also:  http://www.math.fu-berlin.de/~guckes/irc/
#
# Feb 2002:  Use it to search the Internet Movie DataBase (IMDB):
# bind I screen -t 'IMDB' 9 links http://www.imdb.com/
#  bind I screen -t 'IMDB' 9 links http://us.imdb.com/search/
# see also: http://www.math.fu-berlin.de/~guckes/berlinale/
#
 bind K  kill # default!
# bind K
# This *removes* the binding for 'K'
# thus requireing you to enter the
# command via the command line, ie ":kill".
# This prevent accidental killing of your windows.
# Old versions of SCREEN do not prompt for
# confirmation on "killing a window", you see..
#
# LYNX - web browser
# bind L screen -t 'lynx' 4 lynx  http://www.math.fu-berlin.de/~guckes/
# see also:  http://www.math.fu-berlin.de/~guckes/lynx/
#
# see also:  http://www.math.fu-berlin.de/~guckes/links/
# bind L screen -t 'WWW'  4 links http://www.math.fu-berlin.de/~guckes/
#
# bind L screen -t 'WWW'  4 links http://www.lug-camp-2002.de/programm.html
# bind L screen -t 'WWW'  4 links http://www.mdlug.de/index.php/linuxtag2002/vortraege/v12.inc?menu=0|4|
# bind L screen -t 'WWW'  4 links http://www.mdlug.de/index.php/linuxtag2002/programm.inc?menu=0|4|&nomfc=1
#
 bind M monitor # default!
#
# NN - newsreader
# bind N screen -t 'nn' 3 nn
# see also:  http://www.math.fu-berlin.de/~guckes/nn/
# Get some news about the weather... (dont ask ;-)
#  bind N screen -t 'Nepal'  links http://www.wunderground.com/global/stations/44454.html
# bind N screen -t 'Nepal'  links http://www.wunderground.com/global/stations/10382.html
#
# Paste - use 'P' instead of ']':
  bind P paste .
# The character ']' is hard to type on german keyboards,
# as it requires the use of a yet another meta character "AltGR".
# I prefer to use 'P' for "paste" because it is a letter
# which is available at the same position both with the
# US keyboards and keyboards with "Kraut layout" -
# which I call" Krautboards", by the way. ;-)
# bind ] paste . # default!
#
#    Register page at NetMind's Service:
#  bind R screen links http://www.netmind.com/URL-minder/new/register.html
#
#
# SLRN - newsreader
#  bind S screen -t 'slrn' 3 slrn -n -C -k0
# see also:  http://www.slrn.org  http://slrn.sourceforge.net
# and      http://www.math.fu-berlin.de/~guckes/slrn/
#
# VIM - editor
  bind V screen -t 'vim' 0 vim
# Editing comes with email quite naturally -
# so I have reserved window #1 for this.
# http://www.math.fu-berlin.de/~guckes/vim/
# http://www.vim.org/ (which is just a mirror)
#
#    X - a fast way to lock the current screen.
#  bind X lockscreen
#
# bind Y exec !!! echo -n http://www.math.fu-berlin.de/~guckes/
#  bind Y stuff http://www.math.fu-berlin.de/~guckes/
# This pastes the address of my homepage to the process
# in the current window.  very nice - saves some typing.
# and you don't have to have the functionality of
# "abbreviating" in the processes themselves. :-)
#
# my binds
#
#  bind ^w screen -t 'watch' $HOME/.screen/scripts/tetherwatch
#  bind ^c screen -t 'capture' $HOME/.screen/scripts/tethercapture
#  bind ^r screen -t 'output'  $HOME/.screen/scripts/tetherout
#  bind ^o screen -t 'output-short' $HOME/.screen/scripts/tetherout.short
#  bind ^t screen -t 'sysinfo' top

#bind ^N screen -t 'news' links www.debian.de/News/weekly/index.de.html
#bind ^M screen -t w3m cm.adrenalin.de
#bind ^L screen -t watch -n 5 tail -45 /var/log/sysloc
bind ^Y screen -t log watch -n 5 rail -40 /var/log/syslog

#
#
# ===============================================================
# BIND Examples:
# ===============================================================
# You can also paste the values of
# SCREEN's environment variables:
# bind E stuff $EMAIL
# bind U stuff $URL
# bind I stuff $ICQ
#
# ===============================================================
# BINDKEY:
# ===============================================================
# [TODO briefly explain the difference between BIND and BINDKEY]
#
# Use the function keys F7 and F8
# to cycle backwards/forwards in
# the list of existing windows:
#  bindkey -k k7 prev
#  bindkey -k k8 next
#
# make the "kb" send a backspace (CTRL-H:)
# bindkey -d kb stuff ^H
# WARNING:  this does not work as advertised.
# it eats the "kb" when typing "dankbar" for example. :-(
#
#
# ===============================================================
# Key bindings  (TODO)
# ===============================================================
# Remove some default key bindings by binding
# them to "nothing" (empty right-hand-side):
#
# bind .  dumptermcap # default
  bind .
# bind ^\ quit      # default
  bind ^\
# bind \\ quit      # default
  bind \\
# bind h  hardcopy  # default
# bind h
# bind ^h ???       # default
# bind ^h
# bind }  history   # default
# bind }
#
#
# ===============================================================
# At the very end... show the current version and say hello :-)
# ===============================================================
# Briefly show the version number of this starting
# screen session - but only for *one* second:
  msgwait 1
  version
# change back to showing messages
# for duration of two seconds:
  msgwait 2
#
# Welcome the user:
  echo "welcome :-)"
#
# Ths DISPLAY variable keeps getting in my way.
# usually I do not want to start programs which
# need a DISPLAY.  Text Tools rule!  :-)
#  setenv DISPLAY ''
#
# Tell Vim to use a "tabstop" of '8',
# ie expands TABs to the next column
# whose number is a multiple of eight.
# EOF  vim: ts=8

Gentoo example

From Gentoo discribution
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# /etc/screenrc
#
# This is the system wide screenrc.
#
# You can use this file to change the default behavior of screen system wide
# or copy it to ~/.screenrc and use it as a starting point for your own
# settings.
#
# Commands in this file are used to set options, bind screen functions to
# keys, redefine terminal capabilities, and to automatically establish one or
# more windows at the beginning of your screen session.
#
# This is not a comprehensive list of options, look at the screen manual for
# details on everything that you can put in this file.
#
#

# ==============================================================================
# SCREEN SETTINGS
# ==============================================================================

# ESCAPE - the COMMAND CHARACTER
# ===============================================================
# escape ^aa  # default
# escape ^pp  # suggested binding for emacs users

escape ``


# PASSWORD
# ===============================================================
# This commands sets the *internal* password for the screen session.
# WARNING!! If this is set then a "lock" command will only let you in to the
# session after you enter the user's account password and then *also*
# the internal password for that session. This gives additional safety but,
# if you forget the internal password then you cannot resume your session.
# Use :password to generate a password
# password ODSJQf.4IJN7E  # "1234"


# VARIABLES
# ===============================================================
# No annoying audible bell, using "visual bell"
# vbell on				# default: off
# vbell_msg " -- Bell,Bell!! -- "	# default: "Wuff,Wuff!!"

# Automatically detach on hangup.
  autodetach on				# default: on

# Don't display the copyright page
  startup_message off			# default: on

# Uses nethack-style messages
# nethack on				# default: off

# Affects the copying of text regions
  crlf off				# default: off

# Enable/disable multiuser mode. Standard screen operation is singleuser.
# In multiuser mode the commands acladd, aclchg, aclgrp and acldel can be used
# to enable (and disable) other user accessing this screen session.
# Requires suid-root.
  multiuser off				

# Change default scrollback value for new windows
  defscrollback 1000			# default: 100

# Define the time that all windows monitored for silence should
# wait before displaying a message. Default 30 seconds.
  silencewait 15			# default: 30

# bufferfile: The file to use for commands
#             "readbuf" ('<') and  "writebuf" ('>'):
  bufferfile          $HOME/.screen_exchange
#
# hardcopydir:  The directory which contains all hardcopies.
# hardcopydir         ~/.hardcopy
# hardcopydir         ~/.screen
#
# shell:  Default process started in screen's windows.
# Makes it possible to use a different shell inside screen
# than is set as the default login shell.
# If begins with a '-' character, the shell will be started as a login shell.
# shell               bash
  shell -$SHELL

# shellaka '> |tcsh'
# shelltitle '$ |bash'

# emulate .logout message
  pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# caption always " %w --- %c:%s"
# caption always "%3n %t%? @%u%?%? [%h]%?%=%c"

# advertise hardstatus support to $TERMCAP
# termcapinfo  * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'

# set every new windows hardstatus line to somenthing descriptive
# defhstatus "screen: ^En (^Et)"

# don't kill window after the process died
# zombie "^["


# XTERM TWEAKS
# ===============================================================

# xterm understands both im/ic and doesn't have a status line.
# Note: Do not specify im and ic in the real termcap/info file as
# some programs (e.g. vi) will not work anymore.
  termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
  terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l

# 80/132 column switching must be enabled for ^AW to work
# change init sequence to not switch width
  termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

# Make the output buffer large for (fast) xterms.
# termcapinfo xterm* OL=10000
  termcapinfo xterm* OL=100

# tell screen that xterm can switch to dark background and has function
# keys.
  termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
  termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
  termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'

# special xterm hardstatus: use the window title.
  termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
  termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'

# emulate part of the 'K' charset
  termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'

# xterm-52 tweaks:
# - uses background color for delete operations
  termcapinfo xterm* be

# Do not use xterm's alternative window buffer, it breaks scrollback (see bug #61195)
  termcapinfo xterm|xterms|xs ti@:te=\E[2J

# WYSE TERMINALS
# ===============================================================

#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff")
#essential to have it here, as this is a slow terminal.
  termcapinfo wy75-42 xo:hs@

# New termcap sequences for cursor application mode.
  termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J


# OTHER TERMINALS
# ===============================================================

# make hp700 termcap/info better
  termcapinfo  hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'

# Extend the vt100 desciption by some sequences.
  termcap  vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
  terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC
  termcapinfo linux C8
# old rxvt versions also need this
# termcapinfo rxvt C8


# KEYBINDINGS
# ==============================================================
# The "bind" command assign keys to (internal) commands
# SCREEN checks all the keys you type; you type the key
# which is known as the "command character" then SCREEN
# eats this key, too, and checks whether this key is
# "bound" to a command.  If so then SCREEN will execute it.
#
# The command "bind" allows you to chose which keys
# will be assigned to the commands.
#
# Some commands are bound to several keys -
# usually to both some letter and its corresponding
# control key combination, eg the command
# "(create) screen" is bound to both 'c' and '^C'.
#
# The following list shows the default bindings:
#
# break     ^B b
# clear     C
# colon     :
# copy      ^[ [
# detach    ^D d
# digraph   ^V
# displays  *
# dumptermcap .
# fit       F
# flow      ^F f
# focus     ^I
# hardcopy  h
# help      ?
# history   { }
# info      i
# kill      K k
# lastmsg   ^M m
# license   ,
# log       H
# login     L
# meta      x
# monitor   M
# next      ^@ ^N sp n
# number    N
# only      Q
# other     ^X
# pow_break B
# pow_detach  D
# prev      ^H ^P p ^?
# quit      \
# readbuf   <
# redisplay ^L l
# remove    X
# removebuf =
# reset     Z
# screen    ^C c
# select    " '
# silence   _
# split     S
# suspend   ^Z z
# time      ^T t
# title     A
# vbell     ^G
# version   v
# width     W
# windows   ^W w
# wrap      ^R r
# writebuf  >
# xoff      ^S s
# xon       ^Q q
# ^]  paste .
# - select -
# 0 select 0
# 1 select 1
# 2 select 2
# 3 select 3
# 4 select 4
# 5 select 5
# 6 select 6
# 7 select 7
# 8 select 8
# 9 select 9
# I login on
# O login off
# ] paste .
#

# And here are the default bind commands if you need them:
#
# bind A title
# bind C clear
# bind D pow_detach
# bind F fit
# bind H log
# bind I login on
# bind K kill
# bind L login
# bind M monitor
# bind N number
# bind O login off
# bind Q only
# bind S split
# bind W width
# bind X remove
# bind Z reset

# Let's remove some dangerous key bindings ...
  bind k
  bind ^k
# bind .  dumptermcap # default
  bind .
# bind ^\ quit      # default
  bind ^\
# bind \\ quit      # default
  bind \\
# bind ^h ???       # default
  bind ^h
# bind h  hardcopy  # default
  bind h

# ... and make them better.
  bind 'K' kill
  bind 'I' login on
  bind 'O' login off
  bind '}' history

# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
  register [ "\033:se noai\015a"
  register ] "\033:se ai\015a"
  bind ^] paste [.]


# hardstatus alwaysignore
# hardstatus alwayslastline "%Lw"

# Resize the current region. The space will be removed from or added to
# the region below or if there's not enough space from the region above.
  bind = resize =
  bind + resize +3
  bind - resize -3
# bind _ resize max
#
# attrcolor u "-u b"
# attrcolor b "R"

# STARTUP SCREENS
# ===============================================================
# Defines the time screen delays a new message when one message
# is currently displayed. The default is 1 second.
#  msgminwait 2

# Time a message is displayed if screen is not disturbed by
# other activity. The dafault is 5 seconds:
#  msgwait 2

# Briefly show the version number of this starting
# screen session - but only for *one* second:
#  msgwait 1
#  version

# Welcome the user:
# echo "welcome :-)"
# echo "I love you today."

# Uncomment one/some following lines to automatically let
# SCREEN start some programs in the given window numbers:
# screen -t MAIL      0 mutt
# screen -t EDIT      1 vim
# screen -t GOOGLE    2 links http://www.google.com
# screen -t NEWS      3 slrn
# screen -t WWW       4 links http://www.math.fu-berlin.de/~guckes/
# screen 5
# screen 6

# Set the environment variable var to value string. If only var is specified,
# you'll be prompted to enter a value. If no parameters are specified,
# you'll be prompted for both variable and value. The environment is
# inherited by all subsequently forked shells.
# setenv PROMPT_COMMAND 'echo -n -e "\033k\033\134"'

# Don't you want to start programs which need a DISPLAY ?
# setenv DISPLAY ''
#
#
#change the hardstatus settings to give an window list at the bottom of the
##screen, with the time and date and with the current window highlighted

hardstatus alwayslastline
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'

hardstatus string '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%c:%s%{-}'

deflogin off
defutf8 on
title screen

termcapinfo rxvt-unicode ti@:te@
termcapinfo rxvt-unicode 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

Recommended Links

EmacsWiki Gnu Screen

dotfiles.org community for sharing dotfiles screenrc examples




Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: %>