Skip to content

Commit 64e43c0

Browse files
committed
escapestring() $Xauthbin #7
1 parent 2c69bfa commit 64e43c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/bash
22
# runx: Provide an X server in Cygwin, MSYS2 or WSL.
33

4-
Version="v0.4.15"
4+
Version="v0.4.16"
55

66
usage() { # Usage information (--help)
77
echo "runx - Run Linux GUI applications on MS Windows.
@@ -515,13 +515,14 @@ setup_cookie() { # Generate X authentication cookie
515515
[ -e /usr/X11R6/bin/xauth ] || {
516516
mkdir -p /usr/X11R6/bin
517517
echo "#! /bin/bash
518-
$Xauthbin \"$@\"
518+
$(escapestring "$Xauthbin") \"$@\"
519519
" >/usr/X11R6/bin/xauth
520520
}
521521
;;
522522
esac
523523

524524
[ -e "$Xauthbin" ] && {
525+
Xauthbin="$(escapestring "$Xauthbin")"
525526
grep -q "/usr/bin" <<< "$Xauthbin" && Xauthsystem="subsystem" || Xauthsystem="windows"
526527
# generate fresh cookie
527528
$Xauthbin -i -f "$(convertpath $Xauthsystem "$Xcookie")" add :$Newdisplaynumber . $(mcookie)

0 commit comments

Comments
 (0)