17 lines
547 B
Plaintext
Executable File
17 lines
547 B
Plaintext
Executable File
# Create symlink to current ssh socket, if a symlink to an active socket
|
|
# does not exist
|
|
if [ ! -S ~/.ssh/ssh_auth_sock ] && [ -S "$SSH_AUTH_SOCK" ]; then
|
|
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
|
|
fi
|
|
|
|
# Taken from the sshd(8) manpage.
|
|
if read proto cookie && [ -n "$DISPLAY" ]; then
|
|
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
|
|
# X11UseLocalhost=yes
|
|
echo add unix:`echo $DISPLAY | cut -c11-` $proto $cookie
|
|
else
|
|
# X11UseLocalhost=no
|
|
echo add $DISPLAY $proto $cookie
|
|
fi | xauth -q -
|
|
fi
|