This is an update for https://trzeci.eu/configure-graphic-and-sound-on-wsl/
New version of WSL brings lots of fixes and updates: https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/.
Unfortunately it’s still impossible to play a sound out of the shelf. The major problem is connected to the lack of direct support for audio devices. The solution is to use PulseAudio, what creates a server on Windows host, and this server plays a sound what is passed from Linux.
The problem with this solution is that it’s not supported:
Thanks to @therealkenk we can pull modified library for Ubuntu 16.04, like it was possible for 14.04: https://github.com/Microsoft/BashOnWindows/issues/486#issuecomment-299682364
In the following part I will present Base setup, what’s needed to do required steps manually, further you can find “Installation script” what does everything automatically, please choose wisely.
After this step it’s possible to enter Linux environment, but it has few pitfalls.
- Enable developer mode in settings, or use command line alternative (run as Administrator)
1reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
- Enable Windows Subsystem for Linux
1Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Restart Windows
- Either execute
bash, then follow an installation process
lxrun /install /yto install windows with root user and without password (a user can be added later on)
- Either execute
Fix sudo (might be not required)
// Linux installation inherits Windows host name, but it is not configured fully,
sudo needs to have updated
/etc/hosts file with a right host name
sudo sh -c "echo '127.0.0.1 `hostname`' >> /etc/hosts"
Export default display
echo "export DISPLAY=:0.0" >> ~/.bashrc
- Download script from: GIST
- Make sure that you understand what it does, what is:
- Enabling Developer Mode (It will require reboot)
- Installing base WSL component
- Apply fixes:
- Install base packages (unzip, git-core, zsh)
- Install development packages