fix x2go for xfce

DISPLAY worked before only when it was :[0-9]*
not it works for :[0-9]*.[0-9] too
This commit is contained in:
Jakobus Schürz 2021-12-02 15:13:48 +01:00
parent f78c007190
commit 3ccca9a605

View file

@ -28,10 +28,11 @@ fi
# check our client DISPLAY and SSH client IP correspond to # check our client DISPLAY and SSH client IP correspond to
# a running X2Go session and # a running X2Go session and
# check ~/.x2go/agentsocket is a regular file # check ~/.x2go/agentsocket is a regular file
if which x2golistsessions >/dev/null && \ if which x2golistsessions >/dev/null && \
[ -n "$DISPLAY" ] && \ [ -n "$DISPLAY" ] && \
[ -n "$(x2golistsessions | \ [ -n "$(x2golistsessions | \
awk -F '|' '":"$3 == "'${DISPLAY:1:2}'" && \ awk -F '|' '$3 == "'${DISPLAY:1:2}'" && \
$5 == "R" && \ $5 == "R" && \
$8 == "'$(echo $SSH_CLIENT | \ $8 == "'$(echo $SSH_CLIENT | \
awk '{print $1}')'" { print $3 }')" ] && \ awk '{print $1}')'" { print $3 }')" ] && \
@ -44,7 +45,7 @@ if which x2golistsessions >/dev/null && \
if [ -S "$MIGHTBEOURAGENT" ]; then if [ -S "$MIGHTBEOURAGENT" ]; then
# export path to agent socket # export path to agent socket
export SSH_AUTH_SOCK=$MIGHTBEOURAGENT export SSH_AUTH_SOCK=$MIGHTBEOURAGENT
logdebug "export it" logdebug "export SSH_AUTH_SOCK=$MIGHTBEOURAGENT"
fi fi
fi fi