Skip to content

Instantly share code, notes, and snippets.

@bepvte
Created September 19, 2022 16:39
Show Gist options
  • Save bepvte/d3996d1c56fe84a0e74eca07c9d3390c to your computer and use it in GitHub Desktop.
Save bepvte/d3996d1c56fe84a0e74eca07c9d3390c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
# cygstart XWin -nowgl -noprimary -multiwindow -listen tcp -dpi 96 :0
if false; then
address=$(ip -4 -br address show dev eth0 | awk '{sub("/[[:digit:]]+", "", $3);print $3}')
bash.exe --login -s <<- EOF
set -euox pipefail
cygstart -v --directory="\$USERPROFILE" x410.exe /public
sleep 0.2
DISPLAY=:0.0 xhost -
DISPLAY=:0.0 xhost +inet:$address
exit 0
EOF
else
bash.exe --login -s <<- EOF
set -euox pipefail
cygstart -v --directory="\$USERPROFILE" x410.exe /loopback
exit 0
EOF
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment