Skip to content

Commit 0d6debd

Browse files
committed
check xauth with -x instead of -e #7
1 parent 5ecf94c commit 0d6debd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runx

+2-2
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,13 @@ setup_cookie() { # Generate X authentication cookie
510510
}
511511

512512
# describe xauth wrapper for 'ssh -X' in MSYS2, https://github.com/mviereck/runx/issues/7
513-
[ -e "$Xauthbin" ] && [ "$Winsubsystem" = "MSYS2" ] && [ ! -e /usr/X11R6/bin/xauth ] && note "If you want to use 'ssh -X' in MSYS2, you might need
513+
[ -x "$Xauthbin" ] && [ "$Winsubsystem" = "MSYS2" ] && [ ! -x /usr/X11R6/bin/xauth ] && note "If you want to use 'ssh -X' in MSYS2, you might need
514514
to create an executeable script /usr/X11R6/bin/xauth with the content:
515515
#! /bin/bash
516516
$(escapestring "$Xauthbin") \"$@\"
517517
"
518518

519-
[ -e "$Xauthbin" ] && {
519+
[ -x "$Xauthbin" ] && {
520520
grep -q "/usr/bin" <<< "$Xauthbin" && Xauthsystem="subsystem" || Xauthsystem="windows"
521521
# generate fresh cookie
522522
"$Xauthbin" -i -f "$(convertpath $Xauthsystem "$Xcookie")" add :$Newdisplaynumber . $(mcookie)

0 commit comments

Comments
 (0)