Richard Penman
screen

26 Sep 2009

Use ssh to login to server and start screen:

ssh -t $1 'screen -dRR'

Common commands for manipulating screen:

screen -S main # create new screen session named main  
^a d # log out of screen, but leave running  
^a c # new window  
^a k # close window  
^a n # next window  
^a p # previous window  

Configuration file to paste in ~/.screenrc:

hardstatus on  
hardstatus alwayslastline  
startup_message off  
termcapinfo xterm ti@:te@  
hardstatus string "%{= kG}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "  
screen -t bash1 1  
screen -t bash2 2  
screen -t bash3 3  
screen -t bash4 4  

Good reference

blog comments powered by Disqus