### # 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