Skip to content

Commit

Permalink
--interactive on Windows: Add winpty if available #87
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Jan 21, 2019
1 parent b42b364 commit 920dec0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -4208,7 +4208,13 @@ create_dockerrc() { # create dockerrc: This script runs as root (or
echo "read Containerid < <($Dockercommand 2>>$Containerlogfile | rmcr)"
;;
yes)
echo "$Dockercommand <&0 &"
[ "$Winsubsystem" ] && {
Winpty="$(command -v winpty)"
[ "$Winpty" ] || warning "Option -i, --interactive: On MS Windows you need winpty
for an interactive tty. MSYS2 provides it as a package.
On Cygwin it can be compiled from source. WSL isn't supported yet."
}
echo "$Winpty $Dockercommand <&0 &"
echo "Containerid=$Containername"
;;
esac
Expand Down Expand Up @@ -6197,6 +6203,7 @@ declare_variables() { # declare global variables
Winsubmount="" # path within subsystem to mounted Windows drives
Winsubpath="" # path within Windows to subsystem files
Winpidlist="" # List of stored Windows pids (currently vcxsrv.exe on WSL only)
Winpty="" # Path to winpty for --interactive on Windows

# Gaining root privileges to run docker
Passwordfrontend="" # --pw: method to prompt for password. one of pkexec, su, sudo, gksu, gksudo, kdesu, kdesudo, lxsu, lxsudo, beesu, auto, none
Expand Down

0 comments on commit 920dec0

Please sign in to comment.