]> git.madduck.net Git - etc/ssh.git/blob - .ssh/rc

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add pve crypt
[etc/ssh.git] / .ssh / rc
1 PERSISTENT_AUTH_SOCK=$VARDIR/ssh/persistent-ssh-auth.sock
2
3 if [ ! -S "$PERSISTENT_AUTH_SOCK" ] && [ -S "$SSH_AUTH_SOCK" ]; then
4   ln -sf "$SSH_AUTH_SOCK" "$PERSISTENT_AUTH_SOCK"
5 fi
6
7 if [ -n "${DISPLAY:-}" ]; then
8   read proto cookie
9   if [ "${DISPLAY%%:*}" = localhost ]; then
10     # X11UseLocalhost=yes
11     echo add unix:$(echo $DISPLAY | cut -c11-) $proto $cookie
12   else
13     # X11UseLocalhost=no
14     echo add $DISPLAY $proto $cookie
15   fi | xauth -q -
16 fi