From 46111d98b62cc3eadd7184edaa0f035701414a92 Mon Sep 17 00:00:00 2001 From: mviereck Date: Thu, 18 Aug 2022 12:03:28 +0200 Subject: [PATCH] avoid Xauthbin=convertpath() #7 --- runx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/runx b/runx index 78a703a..120b9db 100755 --- a/runx +++ b/runx @@ -1,7 +1,7 @@ #! /bin/bash # runx: Provide an X server in Cygwin, MSYS2 or WSL. -Version="v0.4.17" +Version="v0.4.18" usage() { # Usage information (--help) echo "runx - Run Linux GUI applications on MS Windows. @@ -517,14 +517,13 @@ $(escapestring "$Xauthbin") \"$@\" " [ -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) + "$Xauthbin" -i -f "$(convertpath $Xauthsystem "$Xcookie")" add :$Newdisplaynumber . $(mcookie) # prepare cookie with localhost identification disabled by ffff. ffff means 'familiy wild' - Cookie="$($Xauthbin -i -f "$(convertpath $Xauthsystem "$Xcookie")" nlist | sed -e 's/^..../ffff/')" - printf "$Cookie" | $Xauthbin -i -f "$(convertpath $Xauthsystem "$Xcookie")" nmerge - - verbose "Cookie: $($Xauthbin -v -f "$(convertpath $Xauthsystem "$Xcookie")" list)" + Cookie="$("$Xauthbin" -i -f "$(convertpath $Xauthsystem "$Xcookie")" nlist | sed -e 's/^..../ffff/')" + printf "$Cookie" | "$Xauthbin" -i -f "$(convertpath $Xauthsystem "$Xcookie")" nmerge - + verbose "Cookie: $("$Xauthbin" -v -f "$(convertpath $Xauthsystem "$Xcookie")" list)" } || { note "Command xauth not found. runx will try experimental code to bake an X cookie itself.