[mcstas-users] Use Microsofts "Windows subsystem for Linux" for running McStas under Windows 10!

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Thu Oct 6 21:39:52 CEST 2016


Dear all,


As you may know already, Microsoft has partnered with Cannonical (company behind Ubuntu Linux) and released the (experimental) feature "Windows subsystem for Linux" (WSL), also known as "Bash on Ubuntu on Windows". Read more for instance at http://www.pcworld.com/article/3106463/windows/how-to-get-bash-on-windows-10-with-the-anniversary-update.html

It turns out that it is relatively straightforward to get McStas running under this new feature - thereby overcoming some of the annoyances of McStas on the Windows platform.

To try it out, please follow the below steps

• Install a copy of Windows 10 64 bit
• Update it beyond "Windows 10 Version 1607" - aka the "anniversary build"
• Enable "developer mode" in settings
• Use "turn features on or off" to enable "Bash in windows"
• Start bash via the start icon / cmd+esc
• Install McStas as usual on a Debian systems, see http://mcstas.org/download/install_linux/.  Also remember that you can easily install openmpi etc.
• Install and start the Xming X-server
• Turn back to your bash and execute
• export DISPLAY=localhost:0.0
• mcgui & or mcgui-py & (or any of the usual McStas commands)

Screenshot of mcgui running this way attached to this email.

As the feature is considered experimental, you might still find some rough edges, but so far it seems functional and looks very promising!

A tip for easily accessing your data simulated under Linux is to run from your Windows home folder, accessible under Linux at /mnt/c/Users/<your_username>.


Best regards,

Peter Willendrup


Peter Kjær Willendrup
Senior Research Engineer, Special Advisor

DTU Physics



Technical University of Denmark



[cid:image002.gif at 01CCCAF1.5E6331F0]


Department of Physics
Fysikvej

Building 307

DK-2800 Kongens Lyngby

Direct +45 2125 4612

Mobil +45 2125 4612
Fax +45 4593 2399


pkwi at fysik.dtu.dk<mailto:pkwi at fysik.dtu.dk>

[cid:82024438-9BF0-4357-94C8-AEAF2C214E14]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20161006/9ace8923/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20161006/9ace8923/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20161006/9ace8923/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: McStas-WSL.png
Type: image/png
Size: 235531 bytes
Desc: McStas-WSL.png
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20161006/9ace8923/attachment.png>


More information about the mcstas-users mailing list