Skip to content

Instantly share code, notes, and snippets.

@zthomae
Created October 13, 2012 19:01
Show Gist options
  • Select an option

  • Save zthomae/3885770 to your computer and use it in GitHub Desktop.

Select an option

Save zthomae/3885770 to your computer and use it in GitHub Desktop.
Shell scripts for remote screen on ec2
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 shell 0
screen -t irc 1
screen -t code 2
screen -t etc 3
orig=`/usr/X11R6/bin/xprop -id $WINDOWID | perl -nle 'print $2 if /^WM_NAME.+= "(.*)"$/'`
if [ -z $orig ];
then
orig=`hostname`
fi
echo -e "\033]2;$1\007"
ssh -i $1 -t $2 screen -S main -xRR -p $3 -q
echo -e "\033]2;$orig\007"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment