Add note for Windows about turning WSL off, then back on again (#793)

* Add note for WSL about turning the computer off, then back on again

* Update docs/development_environment.md

Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>

* Update development_environment.md

* Update docs/development_environment.md

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Tip was too big, remove it

* Update development_environment.md

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Update development_environment.md

* Update development_environment.md

* Update development_environment.md

Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
Erik Montnemery 2021-03-16 16:48:26 +01:00 committed by GitHub
parent 137ba0a553
commit 1dc5528400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,9 +49,28 @@ sudo apt-get install python3-pip python3-dev python3-venv autoconf libssl-dev li
### Developing on Windows
To develop on Windows, you will need to use the Linux subsystem. Follow the [WSL installation instructions](https://docs.microsoft.com/windows/wsl/install-win10) and install Ubuntu from the Windows Store. Once you're able to access Linux, follow the Linux instructions.
To develop on Windows, you will need to use the Linux subsystem (WSL). Follow the [WSL installation instructions](https://docs.microsoft.com/windows/wsl/install-win10) and install Ubuntu from the Windows Store. Once you're able to access Linux, follow the Linux instructions.
If you find that you cannot open the development instance via <http://localhost:8123> when using WSL. Instead, within a WSL terminal, find the `inet` address of the `eth0` adaptor by running `ip addr show eth0`. Then use this address, excluding the CIDR block, to access the development instance, i.e. if your `inet` is listed as `172.20.37.6/20`, use <http://172.20.37.6:8123>.
:::tip
If you find that you cannot open the development instance via <http://localhost:8123> when using WSL, instead, within a WSL terminal, find the `inet` address of the `eth0` adaptor by running `ip addr show eth0`. Then use this address, excluding the CIDR block, to access the development instance, i.e. if your `inet` is listed as `172.20.37.6/20`, use <http://172.20.37.6:8123>.
:::
#### Freshly installed WSL distribution
The first time a WSL distribution is started, and the default WSL user account is created, the Windows drives will still be mounted with all files owned by `root:root` instead of owned by the default user, i.e. with `uid=0,gid=0` included in the mount options as shown by:
```bash
user@DESKTOP:/mnt/c/Users/user$ mount | grep mnt
C:\ on /mnt/c type drvfs (rw,noatime,uid=0,gid=0,case=off)
```
This will cause the `setup` script to fail with an unrelated error if the local repository is on a Windows drive. To recover, WSL must be restarted after which the Windows drives will be mounted with all files owned by the default WSL user. This can be accomplished by simply restarting the computer, or by issuing the following command from a windows command prompt:
```bash
wsl --shutdown
```
After WSL is restarted, the mount's uid and gid will match the default user.
### Developing on macOS