Skip to content

Instantly share code, notes, and snippets.

@mogya
Created December 14, 2011 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogya/1479109 to your computer and use it in GitHub Desktop.
Save mogya/1479109 to your computer and use it in GitHub Desktop.
run tmux at startup.
# use tmux for every session.
P_PROC=`ps aux | grep $PPID | grep sshd | awk '{ print $11 }'`
if [ "$P_PROC" = sshd: ]; then
/usr/local/bin/tmux -u attach || /usr/local/bin/tmux -u
# exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment