Skip to content

Instantly share code, notes, and snippets.

@ruskotron
Last active August 29, 2015 14:22
Show Gist options
  • Save ruskotron/efde94e1106623154629 to your computer and use it in GitHub Desktop.
Save ruskotron/efde94e1106623154629 to your computer and use it in GitHub Desktop.
# Tips from https://www.mattcutts.com/blog/a-quick-tutorial-on-screen/
# Use Ctrl-Z instead of Ctrl-A for escape
#escape ^Zz
# "You'll get scrolling like you're used to (with your wheely mouse)"
termcapinfo xterm|xterms|xs|rxvt ti@:te@
# you will get a bottom bar indicating name of machine you're on, a clock, and indicators in which shell you currently are.
# Use CTRL-A SHIFT-A to rename your shells. The names will then also appear in the bottom bar
caption always "%H %c | %-w%{=}%n-%t%{-}%+w"
# more tips from https://www.mattcutts.com/blog/screen-power-tips-screenrc/
autodetach on # Autodetach session on hangup instead of terminating screen completely
startup_message off # Turn off the splash screen
defscrollback 30000 # Use a 30000-line scrollback buffer
export color_prompt=yes
shell -$SHELL
# pre-create a bunch of task-specific screens
screen sudo -i
title "root"
screen sudo -i -u appuser
title "appuser"
screen sudo -i -u adminuser
title "adminuser"
screen sudo -i -u spare
title "spare"
screen sudo -i -u dbuser
title "dbuser"
select 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment