1
0
mirror of https://github.com/balkian/dotfiles.git synced 2025-08-23 16:02:19 +00:00

Added SSH_AUTH_SOCKET fix

This commit is contained in:
J.Fernando Sánchez
2013-03-26 02:57:43 +01:00
parent 115a9e3118
commit 70de8170b0
4 changed files with 19 additions and 22 deletions

16
starttmux Normal file
View File

@@ -0,0 +1,16 @@
# TMUX
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
# if no session is started, start a new session
if [[ -n $(which tmux) ]]; then
stty -ixon
if [ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/.ssh/ssh_auth_sock" ] ; then
unlink "$HOME/.ssh/ssh_auth_sock" 2>/dev/null
ln -s "$SSH_AUTH_SOCK" "$HOME/.ssh/ssh_auth_sock"
export SSH_AUTH_SOCK="$HOME/.ssh/ssh_auth_sock"
fi
test -z ${TMUX} && tmux attach
# when quitting tmux, try to attach
if [[ -z ${TMUX} ]]; then
exit;
fi
fi