Install MicMac in Windows Subsystem for Linux
You can also use MicMac on Windows 10 through the Windows Subsystem for Linux (WSL). WSL allows you to run a Linux distribution (e.g. Ubuntu) directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup. Then you can install MicMac by following the Ubuntu installation guide.
- 1 Install WSL
- 2 Windows Terminal
- 3 Use MicMac's graphical user interfaces
The following steps are adapted from the Windows Subsystem for Linux Installation Guide for Windows 10. Only the manual procedure is described. For the automatic procedure (or for more details/troubleshooting), please refer to the external link.
Enable the "Windows Subsystem for Linux" optional feature
Open Windows PowerShell as Administrator (you can hit the Windows logo key and type powershell), then run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
It is recommended to update to WSL 2, but if you wish to only install WSL 1, you can now restart your machine and move on to the #Install your Linux distribution of choice step. To update to WSL 2, wait to restart your machine and move on to the next step.
Check requirements for running WSL 2
To update to WSL 2, you must be running Windows 10:
- For x64 systems: Version 1903 or higher, with Build 18362 or higher.
- For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
- Builds lower than 18362 do not support WSL 2.
To check your version and build number, hit Windows logo key + R, type winver, select OK.
Enable Virtual Machine feature
Before installing WSL 2, you must enable the Virtual Machine Platform optional feature. Your machine will require virtualization capabilities to use this feature.
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your machine to complete the WSL install and update to WSL 2.
Download the Linux kernel update package to update to WSL 2
- Download the latest package for either x64 or ARM64 systems, depending on your machine:
- Run the update package downloaded in the previous step. (Double-click to run - you will be prompted for elevated permissions, select ‘yes’ to approve this installation.)
Set WSL 2 as your default version
Open PowerShell and run this command to set WSL 2 as the default version when installing a new Linux distribution:
wsl --set-default-version 2
Install your Linux distribution of choice
- Open the Microsoft Store and select your favorite Linux distribution (e.g. Ubuntu 20.04).
- From the distribution's page, select "Get".
The first time you launch a newly installed Linux distribution, a console window will open and you'll be asked to wait for a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second.
You will then need to create a user account and password for your new Linux distribution:
You can now run Linux on Windows 10! To install MicMac on Ubuntu, follow these steps.
Windows Terminal is a very convenient tool for working in command lines on Windows. Follow this installation guide to use it.
Many options for customizing the terminal are available through the
settings.json file (accessible from the terminal preferences).
Some useful shortcuts
Ctrl + Tab: switch between tabs
Ctrl + Shift + T: open a new tab
Alt + Shift + +: vertical split of the active tab
Alt + Shift + -: horizontal split of the active tab
Alt + ←↑→ or ↓: move between tabs
Alt + Shift + ←↑→ or ↓: change the size of the active tab
Ctrl + Shift + W: close the active tab
Use MicMac's graphical user interfaces
To use MicMac's graphical user interfaces (GUIs) (e.g. SaisieMasq, SaisieAppuisInit) in WSL, you will need to install an X-server, such as VcXsrv.
If when you start VcXsrv the GUI does not appear, you may need to add some lines in your
.bashrc file. In your Linux terminal, type:
Add the following line at the end of the file:
If you use WSL 2, add:
export DISPLAY=$(grep -oP "(?<=nameserver ).+" /etc/resolv.conf):0
And if you use WSL 2 and Ubuntu 20.04, add also:
(from Wiki ubuntu-fr)
Here is a set of parameters successfuly tested:
export DISPLAY=:0 export LIBGL_ALWAYS_INDIRECT=1
Close nano and open a new terminal. You should now be able to display the GUIs from this new terminal. If you end up with a black window, try changing its size by dragging the borders a bit and the GUI should display correctly.