Skip to content

Commit

Permalink
adjust XAUTHORITY to maybe be understood in MSYS2 by linux and Window…
Browse files Browse the repository at this point in the history
…s applications as well #7
  • Loading branch information
mviereck committed Aug 17, 2022
1 parent a6fc1c2 commit e4feba0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runx
Original file line number Diff line number Diff line change
Expand Up @@ -718,11 +718,11 @@ main() {
Compare: https://github.com/mviereck/x11docker/issues/108"

# set DISPLAY and XAUTHORITY, output on stdout
export DISPLAY=$Hostip:$Newdisplaynumber
Xcookie="$(convertpath windows "$(MSYS2_ARG_CONV_EXCL='*' cmd.exe /C "echo %userprofile%")" | rmcr)/Xauthority.runx"
DISPLAY=$Hostip:$Newdisplaynumber
Xcookie="$(convertpath subsystem "$(MSYS2_ARG_CONV_EXCL='*' cmd.exe /C "echo %userprofile%")" | rmcr)/Xauthority.runx"
case "$Xauthentication" in
yes)
export XAUTHORITY="$(convertpath subsystem "$Xcookie")"
XAUTHORITY="$(convertpath subsystem "$Xcookie")"
verbose "DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY"
note "If you get application error messages like 'Cannot open display'
or 'Invalid MIT-MAGIC-COOKIE', the X authentication cookie might be broken.
Expand All @@ -740,6 +740,7 @@ main() {
echo "DISPLAY=$DISPLAY"
;;
esac
export DISPLAY XAUTHORITY

# run X
[ "$Xalreadyrunning" = "no" ] && start_xserver
Expand Down

0 comments on commit e4feba0

Please sign in to comment.