summaryrefslogtreecommitdiff
path: root/roles/tools/files/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'roles/tools/files/ssh')
-rw-r--r--roles/tools/files/ssh/rc11
1 files changed, 6 insertions, 5 deletions
diff --git a/roles/tools/files/ssh/rc b/roles/tools/files/ssh/rc
index 35b7d34..32d1bd4 100644
--- a/roles/tools/files/ssh/rc
+++ b/roles/tools/files/ssh/rc
@@ -1,8 +1,9 @@
1#!/bin/bash 1#!/bin/bash
2 2
3if [ -n "$DISPLAY" ]; then 3if read proto cookie && [ -n "$DISPLAY" ]; then
4 export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" 4 if [ `echo $DISPLAY | cut -c1-10` = "localhost:" ]; then
5 read protocol cookie 5 echo add unix:`echo $DISPLAY | cut -c11-` $proto $cookie
6 xauth remove $DISPLAY 6 else
7 xauth add $DISPLAY "$protocol" "$cookie" 7 echo add $DISPLAY "$protocol" "$cookie"
8 fi | xauth -q -
8fi 9fi