Skip to content

Commit

Permalink
Update WSL readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
willend committed Dec 12, 2022
1 parent 77d550d commit 3e3a3ab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 6 additions & 10 deletions INSTALL-McStas-2.x/Windows/WSL/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Installation of McStas 2.X on Windows 64 bit systems - using WSL
# Installation of McStas 2.7.2 on Windows 64 bit systems - using WSL
*(WSL is the Windows Subsystem for Linux, aka. bash on Ubuntu on Windows)*


Expand All @@ -12,21 +12,20 @@
* Let the machine reboot if necessary
* Open the Windows store
* Search for Ubuntu
* Install Ubuntu 16.04 LTS or 18.04 LTS (other Linuxes are also
* Install e.g. Ubuntu 22.04 LTS (other Linuxes are also
available, but we recommend Ubuntu)
* Click Launch to run the app and follow on-screen instructions
* To open it again later, simply issue bash in a terminal or through
the start menu

## Install the McStas 2.X Debian packages
## Install the McStas 2.7.2 Debian packages
* Follow the
[normal Debian installation instructions](../../Linux/debian/README.md)
- essentially a matter of sudo apt-get install mcstas-suite-python mcstas-suite-perl
- essentially a matter of sudo apt-get install mcstas-suite-python mcstas-suite-python

## Install Xming or another X11 server application
* Download and install Xming via https://sourceforge.net/projects/xming/
* Windows store also provides a $-ware called X410 from "Choung Networks"
* If you are using wsl 2 ensure that the correct ip for you wsl session

## Optionally add a few commands at the end of your .bashrc:
```bash
Expand All @@ -38,10 +37,7 @@ user name
```bash
# cd to the home dir of your windows user
cd /mnt/c/Users/pwill
```
If you installed wsl version 1
```
# Add the DISPLAY variable to talk to Xming for wsl version 1
# Add the DISPLAY variable to talk to Xming
export DISPLAY=:0.0
```
if you installed wsl version 2 your ubuntu session has a unique ip
Expand All @@ -59,7 +55,7 @@ DISPLAY=:0.0)

## Configuring McStas to use the Windows browser
* Ensure the package ubuntu-wsl (or equivalent) is installed
* Set the BROWSER="wslview" in your /usr/share/mcstas/3.0/tools/Python/mccodelib/mccode_config.py
* Set the BROWSER="wslview" in your /usr/share/mcstas/2.7.2/tools/Python/mccodelib/mccode_config.py

## In case of issues
Please report any trouble with the repository to [mcstas-users](mailto:[email protected])
Expand Down
10 changes: 8 additions & 2 deletions INSTALL-McStas-3.x/Windows/WSL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Let the machine reboot if necessary
* Open the Windows store
* Search for Ubuntu
* Install Ubuntu 16.04 LTS or 18.04 LTS (other Linuxes are also
* Install e.g. Ubuntu 22.04 LTS (other Linuxes are also
available, but we recommend Ubuntu)
* Click Launch to run the app and follow on-screen instructions
* To open it again later, simply issue bash in a terminal or through
Expand All @@ -21,7 +21,7 @@ the start menu
## Install the McStas 3.2 Debian packages
* Follow the
[normal Debian installation instructions](../../Linux/debian/README.md)
- essentially a matter of sudo apt-get install mcstas-suite-python mcstas-suite-perl
- essentially a matter of sudo apt-get install mcstas-suite-python mcstas-suite-python-ng

## Install Xming or another X11 server application
* Download and install Xming via https://sourceforge.net/projects/xming/
Expand All @@ -40,6 +40,12 @@ cd /mnt/c/Users/pwill
# Add the DISPLAY variable to talk to Xming
export DISPLAY=:0.0
```
if you installed wsl version 2 your ubuntu session has a unique ip
```
# Add the DISPLAY variable to talk to Xming for wsl version 2
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
```

## Start mcgui
* Ensure your X11 server is running
Expand Down

0 comments on commit 3e3a3ab

Please sign in to comment.