|
1 | 1 | #! /bin/bash
|
2 | 2 | # runx: Provide an X server in Cygwin, MSYS2 or WSL.
|
3 | 3 |
|
4 |
| -Version="v0.4.14" |
| 4 | +Version="v0.4.15" |
5 | 5 |
|
6 | 6 | usage() { # Usage information (--help)
|
7 | 7 | echo "runx - Run Linux GUI applications on MS Windows.
|
@@ -467,8 +467,8 @@ generate_xcommand() { # Generate command to start X server VcXsrv
|
467 | 467 | case $Xauthentication in
|
468 | 468 | yes)
|
469 | 469 | case "$Xserver" in
|
470 |
| - xwin) Xcommand="$Xcommand -auth '$(convertpath subsystem "$Xcookie")'" ;; |
471 |
| - vcxsrv) Xcommand="$Xcommand -auth '$(convertpath windows "$Xcookie")'" ;; |
| 470 | + xwin) Xcommand="$Xcommand -auth '$Xcookie'" ;; |
| 471 | + vcxsrv) Xcommand="$Xcommand -auth '$(convertpath windows "$Xcookie")'" ;; |
472 | 472 | esac ;;
|
473 | 473 | no) Xcommand="$Xcommand -ac" ;;
|
474 | 474 | esac
|
@@ -496,12 +496,12 @@ setup_cookie() { # Generate X authentication cookie
|
496 | 496 | command -v tasklist.exe >/dev/null && {
|
497 | 497 | tasklist.exe | rmcr | grep -q -E 'vcxsrv.exe|XWin.exe' || {
|
498 | 498 | verbose "Removing old cookies."
|
499 |
| - [ -e "$(convertpath subsystem "$Xcookie")" ] && rm "$(convertpath subsystem "$Xcookie")" |
| 499 | + [ -e "$Xcookie" ] && rm "$Xcookie" |
500 | 500 | }
|
501 | 501 | }
|
502 | 502 |
|
503 | 503 | # avoid missing file message of xauth
|
504 |
| - touch "$(convertpath subsystem "$Xcookie")" |
| 504 | + touch "$Xcookie" |
505 | 505 |
|
506 | 506 | # check for native xauth, otherwise use xauth.exe from VcXsrv
|
507 | 507 | Xauthbin="$(command -v xauth)"
|
@@ -536,7 +536,7 @@ $Xauthbin \"$@\"
|
536 | 536 | https://github.com/mviereck/runx/issues/7
|
537 | 537 | If it fails, you can use option --no-auth as a workaround."
|
538 | 538 | cookiebaker $Hostip:$Newdisplaynumber > $Xcookie.tmp
|
539 |
| - cat $Xcookie.tmp >> "$(convertpath subsystem "$Xcookie")" |
| 539 | + cat $Xcookie.tmp >> "$Xcookie" |
540 | 540 | rm $Xcookie.tmp
|
541 | 541 | }
|
542 | 542 | }
|
@@ -599,7 +599,7 @@ cleanup() { # --cleanup: Terminate X servers, delete cookies
|
599 | 599 | MSYS2_ARG_CONV_EXCL='*' taskkill.exe /F /PID xwin.exe
|
600 | 600 | # Remove cookies
|
601 | 601 | Newdisplaynumber=0
|
602 |
| - rm -v "$(convertpath subsystem "$Xcookie")" |
| 602 | + rm -v "$Xcookie" |
603 | 603 | }
|
604 | 604 |
|
605 | 605 | ### main
|
@@ -739,7 +739,7 @@ main() {
|
739 | 739 | Xcookie="$(convertpath subsystem "$(MSYS2_ARG_CONV_EXCL='*' cmd.exe /C "echo %userprofile%")" | rmcr)/Xauthority.runx"
|
740 | 740 | case "$Xauthentication" in
|
741 | 741 | yes)
|
742 |
| - XAUTHORITY="$(convertpath subsystem "$Xcookie")" |
| 742 | + XAUTHORITY="$Xcookie" |
743 | 743 | verbose "DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY"
|
744 | 744 | note "If you get application error messages like 'Cannot open display'
|
745 | 745 | or 'Invalid MIT-MAGIC-COOKIE', the X authentication cookie might be broken.
|
|
0 commit comments