diff --git a/runx b/runx index 9cc7e08..0305250 100755 --- a/runx +++ b/runx @@ -1,7 +1,7 @@ #! /bin/bash # runx: Provide an X server in Cygwin, MSYS2 or WSL. -Version="v0.4.15" +Version="v0.4.16" usage() { # Usage information (--help) echo "runx - Run Linux GUI applications on MS Windows. @@ -515,13 +515,14 @@ setup_cookie() { # Generate X authentication cookie [ -e /usr/X11R6/bin/xauth ] || { mkdir -p /usr/X11R6/bin echo "#! /bin/bash -$Xauthbin \"$@\" +$(escapestring "$Xauthbin") \"$@\" " >/usr/X11R6/bin/xauth } ;; esac [ -e "$Xauthbin" ] && { + Xauthbin="$(escapestring "$Xauthbin")" grep -q "/usr/bin" <<< "$Xauthbin" && Xauthsystem="subsystem" || Xauthsystem="windows" # generate fresh cookie $Xauthbin -i -f "$(convertpath $Xauthsystem "$Xcookie")" add :$Newdisplaynumber . $(mcookie)