Skip to content

Instantly share code, notes, and snippets.

@codec
Created May 29, 2012 12:40
Show Gist options
  • Save codec/2828182 to your computer and use it in GitHub Desktop.
Save codec/2828182 to your computer and use it in GitHub Desktop.
screenrc for serial consoles ... screenrc from xen-shell
# adduser --system --shell /bin/bash console
# gpasswd -a console dialout
(screen -rUd || screen /dev/ttyUSB0 9600 8n1); exit $?
startup_message off
#
# Disable shells
#
shell /bin/false
#
# Visual bell instead of sound
#
vbell on
vbell_msg "BELL!"
defscrollback 1024
#
# Unbind these keys
#
bind :
bind Z
bind L
bind ^\
bind \\ quit
bind K kill
bind } history
#
# The vt100 description does not mention "dl". *sigh*
#
termcapinfo vt100 dl=5\E[M
#
# Set the hardstatus prop on gui terms to set the titlebar/icon title
#
termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
# 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)
#
# look and feel
caption always "%{= bb}%{+b w}%n %h %=%t %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#
# set these terminals up to be 'optimal' instead of vt100
#
termcapinfo xterm*|linux*|rxvt*|Eterm* OP
# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
# (This fixes the "Aborted because of window size change" konsole symptoms found
# in bug #134198)
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
#
# The title of our shell.
#
shelltitle "Serial Console"
#
# Message shown on startup.
#
wall "Serial Console starting .. please wait .."
startup_message off
#
# Shells are login shells.
#
deflogin on
shell /bin/false
#
# Visual bell instead of sound
#
vbell on
vbell_msg "BELL!"
defscrollback 1024
#
# Unbind these keys
#
bind :
bind Z
bind L
bind ^\
bind \\ quit
bind K kill
bind } history
#
# The vt100 description does not mention "dl". *sigh*
#
termcapinfo vt100 dl=5\E[M
#
# Set the hardstatus prop on gui terms to set the titlebar/icon title
#
termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
# 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)
#
# look and feel
caption always "%{= bb}%{+b w}%n %h %=%t %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
#
# set these terminals up to be 'optimal' instead of vt100
#
termcapinfo xterm*|linux*|rxvt*|Eterm* OP
# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
# (This fixes the "Aborted because of window size change" konsole symptoms found
# in bug #134198)
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
#
# The title of our shell.
#
shelltitle "Serial Console"
#
# Message shown on startup.
#
wall "Serial Console starting .. please wait .."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment