Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add a wiki page for WSL setup #610

Open
cosban opened this issue Aug 8, 2021 · 0 comments
Open

Please add a wiki page for WSL setup #610

cosban opened this issue Aug 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@cosban
Copy link

cosban commented Aug 8, 2021

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.

  1. Perform all prerequisite setup within the WSL linux image
    1. Set up golang 1.13 or higher
    2. Install flutter within the image
    3. Install all required dependencies for the chosen WSL linux distro
  2. Windows insiders with OS builds >=21362 should follow Microsoft's official documentation
    1. Everyone else should continue along
  3. Set the DISPLAY variable within the the WSL linux image depending on your WSL version
    1. Check WSL version using wsl.exe -l --verbose in the windows host
    2. If using WSL1 run export DISPLAY=localhost:0.0
    3. If using WSL2 run export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
    4. Feel free to add these to /etc/profile, ~/.bashrc, ~/.zshrc, etc. if it is desired to have them be run automatically
  4. Set up the windows host to display WSL gui programs.
    1. Install an x-server for windows (VcXsrv is a good one)
    2. You will likely need to modify your firewall in order to display the applications since the host connects to WSL as a public network
      1. Verify that a public Inbound Rule for your x-server has been created and can be used by the 127.16.0.0/12 range
      2. wsl-windows-toolbar-launcher does a good job showing you how to do this
  5. Launch your windows x-server and run your app
    1. If using VcXsrv, the best thing to do is to run xlaunch in order to configure the x-server behavior
@cosban cosban added the enhancement New feature or request label Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant