This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
doc:howto:ssh-agent-workaround [2017/01/08 12:55] stefanbaur |
doc:howto:ssh-agent-workaround [2017/01/08 13:05] stefanbaur |
||
---|---|---|---|
Line 15: | Line 15: | ||
# check we have an agent socket and | # check we have an agent socket and | ||
- | # check we have an ~/.x2goclient | + | # check we have an ~/.x2go directory |
if [ -n " | if [ -n " | ||
- | [ -d ~/.x2goclient | + | [ -d ~/.x2go ] ; then |
# touch the output file and set permissions | # touch the output file and set permissions | ||
# (as tight as possible) | # (as tight as possible) | ||
- | touch ~/.x2goclient/ | + | touch ~/.x2go/ |
- | chmod 600 ~/.x2goclient/ | + | chmod 600 ~/.x2go/ |
- | chown $USER ~/.x2goclient/ | + | chown $USER ~/.x2go/ |
# write file name of agent socket into file | # write file name of agent socket into file | ||
- | echo $SSH_AUTH_SOCK >~/.x2goclient/ | + | echo $SSH_AUTH_SOCK >~/.x2go/ |
fi | fi | ||
Line 33: | Line 33: | ||
# 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 ~/.x2goclient/agent is a regular file | + | # check ~/.x2go/agent is a regular file |
if which x2golistsessions >/ | if which x2golistsessions >/ | ||
[ -n " | [ -n " | ||
Line 41: | Line 41: | ||
$8 == "' | $8 == "' | ||
awk ' | awk ' | ||
- | [ -f ~/.x2goclient/ | + | [ -f ~/.x2go/ |
# all checks passed, read content of file | # all checks passed, read content of file | ||
# (might still contain stale agent socket or garbage | # (might still contain stale agent socket or garbage | ||
- | MIGHTBEOURAGENT=$(cat ~/.x2goclient/ | + | MIGHTBEOURAGENT=$(cat ~/.x2go/ |
# check if it corresponds to an existing socket | # check if it corresponds to an existing socket | ||
if [ -S " | if [ -S " |