Open
Description
Describe the feature you'd like
Windows users may want to run hover/flutter using wsl for development. The following would probably be good to add to a wiki, or to the hover readme.
Installing on Linux in WSL
For developers on windows, it may be desired to run and build within a WSL linux environment.
- Perform all prerequisite setup within the WSL linux image
- Set up golang 1.13 or higher
- Install flutter within the image
- Install all required dependencies for the chosen WSL linux distro
- Windows insiders with OS builds >=21362 should follow Microsoft's official documentation
- Everyone else should continue along
- Set the DISPLAY variable within the the WSL linux image depending on your WSL version
- Check WSL version using
wsl.exe -l --verbose
in the windows host - If using WSL1 run
export DISPLAY=localhost:0.0
- If using WSL2 run
export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
- Feel free to add these to
/etc/profile, ~/.bashrc, ~/.zshrc, etc.
if it is desired to have them be run automatically
- Check WSL version using
- Set up the windows host to display WSL gui programs.
- Install an x-server for windows (VcXsrv is a good one)
- You will likely need to modify your firewall in order to display the applications since the host connects to WSL as a public network
- Verify that a public
Inbound Rule
for your x-server has been created and can be used by the127.16.0.0/12
range - wsl-windows-toolbar-launcher does a good job showing you how to do this
- Verify that a public
- Launch your windows x-server and run your app
- If using VcXsrv, the best thing to do is to run xlaunch in order to configure the x-server behavior