Using screen

My work setup is like this: I have two monitors, one for a maximized Thunderbird window, and the other for a PuTTY window, Firefox, Outlook (minimized to tray, and only used for calendar reminders mostly), and IE. Well, I do open other windows, but I tend to use the above most often.

I use PuTTY extensively to manage remote Unix systems. I also like my desktop uncluttered, so instead of multiple PuTTY windows, I only use one. I log on to a "jump" host, fire up `screen`, and I'm all set.

At home, I have a similar setup. Below is my .screenrc:

# Default sessions
screen -t MISC 4
screen -t EVEY 4
screen -t INES 3
screen -t IANDEXTER_COM 2
screen -t IANDEXTER_NET 1
screen -t HOME 0

# Scrolling buffer
defscrollback 99999
altscreen on

# PuTTY fix
term xterm
termcapinfo xterm ti@:te@

# Status line
hardstatus alwayslastline
hardstatus string '%{= kG}%-Lw%{= bW}%50> %n %t %{= kG}%+Lw%< '

# Key bindings
bindkey -k k6 detach
bindkey -k k7 quit
bindkey -k k8 hardstatus alwayslastline
bindkey -k k9 hardstatus alwaysignore

# Other stuff
startup_message off
autodetach on
defutf8 on
crlf off
setenv LC_CTYPE en_US.UTF-8

The Default sessions section opens up windows for my other hosts (guess how I name my boxes ;)). I also have a pretty large scroll buffer -- useful when tailing logs. The hardstatus lines show the sessions and highlights the active one. I got the (not-so) fancy-schmancy color codes from here. Lastly, I bind the F6 to F9 keys to, respectively, detach the screen session, quit screen, toggle off the status line, and put it back on.

My .screenrc at work is more or less the same, except for the sessions I open. I can also tellscreen to use a different shell (I'm an unabashedly Bash fan, heh) apart from what is default in the systems I manage.

Comments

Popular posts from this blog

Pull files off Android phone