Skip to content

Commit

Permalink
WSL: Add Windows system32 path to PATH #153
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed May 5, 2019
1 parent 8fb87aa commit 599f113
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

Project website: https://github.com/mviereck/x11docker

## [Unreleased]
### Fixed
- WSL: Add Windows System32 path to `PATH`. Can miss with `sudo`.
[(#153)](https://github.com/mviereck/x11docker/issues/153)

## [5.6.0](https://github.com/mviereck/x11docker/releases/tag/v5.6.0) - 2019-05-02
### Added
- `--runtime=RUNTIME`: New option to specify container runtime.
Expand Down
15 changes: 9 additions & 6 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Type 'x11docker --help' or scroll down to read usage information.
# More documentation at: https://github.com/mviereck/x11docker

Version="5.6.0"
Version="5.6.1-beta"

usage() { # --help: show usage information
echo "
Expand Down Expand Up @@ -1053,7 +1053,7 @@ installer() { # --install, --update, --update-master, --remove
# --remove
# - remove installed files
local Key1= Key2= Oldversion= Newversion=
export PATH="$PATH:/usr/local/bin" # avoid bug on opensuse where root does not have this in $PATH. Will become obsolete as new default is /usr/bin
export PATH="${PATH:-}:/usr/local/bin" # avoid bug on opensuse where root does not have this in $PATH. Will become obsolete as new default is /usr/bin

# Prepairing
case ${1:-} in
Expand Down Expand Up @@ -3055,7 +3055,7 @@ create_xinitrc() { # create xinitrc: set up X environment, create c
echo "Messagefile=$Messagefifo"
echo ""

echo "export PATH='$PATH'"
echo "export PATH='${PATH:-}'"

echo "verbose -d 'Running xinitrc'"

Expand Down Expand Up @@ -4022,7 +4022,7 @@ create_dockerrc() { # create dockerrc: This script runs as root (or
done < <(env | grep -e '^DOCKER_')

# possible Windows pathes to docker.exe
[ "$Winsubsystem" ] && echo "export PATH=\"$(convertpath --subsystem "C:/Program Files/docker"):$(convertpath --subsystem "C:/Program Files/Docker/Docker/resources/bin"):$PATH\""
[ "$Winsubsystem" ] && echo "export PATH=\"$(convertpath --subsystem "C:/Program Files/docker"):$(convertpath --subsystem "C:/Program Files/Docker/Docker/resources/bin"):${PATH}\""

echo "# check whether docker daemon is running, get docker info"
echo "$Dockerexe info >>$Dockerinfofile 2>>$Containerlogfile || {
Expand Down Expand Up @@ -5478,6 +5478,7 @@ check_host() { # check host environment
Winsubpath="$(convertpath --unix "$(cygpath.exe -w "/" | rmcr)" )" ;;
WSL)
Winsubmount="/mnt"
grep -q "Windows" <<< "${PATH:-}" || export PATH="${PATH:-}:$Winsubmount/c/Windows/System32:$Winsubmount/c/Windows/System32/WindowsPowerShell/v1.0"
Winsubpath="$(convertpath --unix "$(getwslpath)")" ;;
esac

Expand Down Expand Up @@ -5830,7 +5831,7 @@ check_option_interferences() { # check multiple option interferences, change se
esac

# add VcXsrv folder to PATH to get vcxsrv.exe, xhost.exe and xauth.exe available
[ "$Xserver" = "--vcxsrv" ] && export PATH="$PATH:$Vcxsrvpath"
[ "$Xserver" = "--vcxsrv" ] && export PATH="${PATH:-}:$Vcxsrvpath"

# check if a host window manager is needed
[ "$Desktopmode" = "no" ] && [ -z "$Windowmanager" ] && case $Xserver in
Expand Down Expand Up @@ -7348,7 +7349,9 @@ main "$@"

#### ToDo notes for development
todo() {
# BUG --runtime=kata-runtime: ALT-GR works wrong.
# x11docker/check: --alsa: check soundcard iteration

# FIXME: myrealpath(): If realpath is missing, the path argument is returned without resolving.
# CHECK: Xwayland with X over IP
# CHECK: --xpra-xwayland/py3 fails with tor-browser, but not with wine pcmanfm
Expand All @@ -7359,7 +7362,7 @@ todo() {
# BUG error message window in wayland fails: xterm: no display. should use konsole
# CHECK: x11docker/xwayland in a nested setup: where is the X socket ??
# CHECK: elogind in void container: loginctl is empty. ck-list-sessions, too.
# CHECK: su in void containers not possible.
# BUG: --sudouser: su in void containers not possible.

# --init
# autodetect init system if possible, give a note.
Expand Down

0 comments on commit 599f113

Please sign in to comment.