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

WSL Page - Feature Exploration! #2266

Open
craigloewen-msft opened this issue Feb 15, 2024 · 19 comments
Open

WSL Page - Feature Exploration! #2266

craigloewen-msft opened this issue Feb 15, 2024 · 19 comments
Labels
Issue-Feature New feature or request Needs-Community Feedback We need additional help with how something should act / look Needs-Spec A spec should be written for this feature

Comments

@craigloewen-msft
Copy link
Member

craigloewen-msft commented Feb 15, 2024

Dev Home Feature Exploration: WSL Page

Please Provide Feedback & Ideas!

Let us know what you think about this feature by commenting on this issue! We'd love to hear your ideas and feedback. We will share out our list in the near future but want to hear from you first so we don't influence what is most useful for you.

Comment below:

  • What do you like about the feature?
  • What do you think is missing / what could improve this feature?

1. Scenario description

1.1. Narrative

Clark is a new developer in college, and is programming for the first time. He needs to use Linux to compile his C++ and was recommended to use WSL. Since he's not too familiar with CLIs yet, he installs WSL through Dev Home and is easily able to see and manage his Linux distros. From there he can launch into them comfortably, and feels in control of his Linux environment on Windows.

1.2. General problem statement

Currently the Windows Subsystem for Linux is a command line focused application. There isn't an easy built-in way for users to discover, interact with, or manage WSL through a graphical interface. This feature would focus on making WSL functionality available through GUI, to increase discovery and usability for a wider range of users.

1.3. Customer evidence

The highest 'Upvoted' issue on the Dev Home repository is asking for more WSL integration.

Please note that this specific request is around integrating WSL with machine config, but we should take this as a strong data point that users would like WSL to be more integrated with Dev Home.

1.4 Existing solutions

  • Raft
  • Command line interface

2. Design

2.1. UI Mockup

image

Mockup of WSL page in Dev Home, PM art (It's kind of like outsider art [That's an art joke])

2.2. User Cans

With this feature a user will be able to...

P0s:

  • Navigate to a dedicated "Windows Subsystem for Linux" tab in Dev Home
    • Needs to be configurable / changeable as default on or off by Dev Home team (Scenario: We chose the wrong default)
    • Needs to have a 'card layout' and a 'grid' layout that's switchable
  • If WSL is not installed, install it
    • Select a specific Linux distro to start with
  • Install new WSL distros
    • Needs feature detection (WSL version detection)
  • Shut down the WSL VM
  • See a list of all installed WSL distros and for each:
    • See state (Running, Off, etc.)
    • Terminate distro
    • Uninstall distro
    • Launch distro
      • As a specific user as well
    • Set as the default WSL distro

P0.5:

  • See a list of all installed WSL distros and for each:
    • Change install location
  • Import WSL distros from VHD or from tar
  • Export WSL distro to VHD or tar

P1s:

  • See total RAM and CPU being used by WSL at that moment
    • Total (Entire VM)
    • Also per distro
  • Mount a Linux formatted disk
    • From a VHD
    • From installed disks
  • See what's new in WSL
    • Open release notes

2.3. Open Questions

  • How do we handle the Docker Desktop distros? We don't necessarily want users launching into those. Should we special case them?
  • If we want to show GUI apps in WSL how do we list them?
  • Are we ok with having a top level tab called "WSL" in Dev Home?
    • Proceeding with: Yes, but make it configurable to turn it off

2.4 Release plan

The first iteration of this feature will only deliver the P0 user can's above. After that experience is shipped we can determine whether we want to keep adding the P0.5 and P1 user can's as well.

@craigloewen-msft craigloewen-msft added the Issue-Feature New feature or request label Feb 15, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage New issue that the core contributors need to triage label Feb 15, 2024
@saadanerdetbare
Copy link

It will be important to be able to lock wsl to OS language so when it pull from store it does not suddenly change. This is said from a user in Denmark with a en-US os and this is a bug. If installing from store WSL will suddenly be in Danish and this extremely irritating so I can only use installers

@rogatec
Copy link

rogatec commented Feb 16, 2024

Hi!

I guess this is the room for wishes / thoughts about this dev home feature?

In general I really like the idea of an overview of existing unix systems and the options to stop/start/restart/shutdown etc. 👍🏽

It would be great, to configure the landing page when starting the terminal, either the dashboard or just entering the default distro.

Additional thoughts:

  • (✅ implemented with P1): I really like numbers, so on the dashboard hopefully I can see the cpu, memory, swap etc. for each running unix system
    • Addon: which processes are most active (sort by cpu / memory)
  • Speaking of data, maybe it's possible to lookup log files?
  • Maybe it is also possible to have an information about pending updates (at least for security reasons eg. mabye existing CVEs or other outdated libraries) <-- thinking of something like Docker Desktop has when you inspect a docker image.
    • ❔ P0: Needs feature detection (WSL version detection) <-- I don't know if this will implement this kind of feature
  • What about backup and restore functionality for distro's? (wsl --export and wsl --import)

@Stanzilla
Copy link

I always thought it would be cool if WS for Linux had the same options panel as WS for Android. Now that you bring up potential DevHome integration, I guess both could live there but still have separate shortcuts to launch into them?

@pirafrank
Copy link

I am in favor of this. features I'd like

  • .wslconfig options can be set from Dev Home
  • option to mount thumb drives from Windows host to a WSL distro of choice (e.g. Mount Windows Disk option aside of the Linux one)
  • ability to interact with certain wsl commands from GUI (e.g. rebooting WSL in place of wsl --shutdown + wsl in PowerShell)

@craigloewen-msft
Copy link
Member Author

Linking to the other issue: #748 since they are related ideas :)

@cinnamon-msft cinnamon-msft added Needs-Spec A spec should be written for this feature Needs-Community Feedback We need additional help with how something should act / look and removed Needs-Triage New issue that the core contributors need to triage labels Mar 1, 2024
@theuserbl
Copy link

Nice.

But there existing more solutions then "Raft". I have none of them tested.

For example

But I think, that a WSL-developer could created a better integrated GUI, which is more then only a frontend of an command line program. For example, like in the mockup shown, something to show the used memory and CPU-usage of every VM. Possible in an graph like the TaskManger doing it for the complete computer.

@theuserbl
Copy link

And only to mention: "Windows Lastest" have written about this plan:
https://www.windowslatest.com/2024/03/24/microsoft-will-let-you-manage-linux-distros-on-windows-11-through-gui/

@hackdefendr
Copy link

Yep, I'm on board with a Microsoft Developed integrated GUI for managing distro installations similar to managing virtual machines. Start, Stop, Pause, Edit, etc. The more I think about the possibilities the more excited I get about this idea. You have my vote to move forward 💯

@stevenhobs
Copy link

I'm really passionate about WSL (Windows Subsystem for Linux), and I recently found out that DevHome is going to integrate WSL distribution management. However, I've had my own ideas for a while now. This is the design concept I came up with, and you can take it as a reference. If there's anything specific that you don't understand or if you'd like to consult me in detail, feel free to ask. Anyway, I'm working on implementing these features to make my own WSL experience more user-friendly and flexible.
wsl-panel

@Kraego
Copy link

Kraego commented Mar 26, 2024

Cool idea to make an UI. I have two features in mind which are missing in the proposal.

Feature 1:
A option to navigate to the root of the distro on host os.

Feature 2:
Configure virtual LAN Adapter of WSL (stuff from wsl config and even more).

@dpeterc
Copy link

dpeterc commented Mar 26, 2024

This GUI is very much needed if we wish to propose WSL to normal users.
It would be great if "Machine configuration" would allow changing network settings, for example setting of permanent MAC address (now it changes after every reboot).
I think that in design phase, you should look at vmWare and VirtualBox GUI settings of virtual machines, check which of the options also apply to WSL, and provide GUI tools to check status and/or change settings.
Settings

@thetredev
Copy link

thetredev commented Mar 26, 2024

Company environment

For a company environment, I would add these requirements:

Number Requirement Reasoning / Remarks
1 Import a .tar.gz image file from a URL Custom built WSL images, prepared for the specific company environment, might be hosted on some remote location (i.e. HTTPS server)
2 Custom image repository overview Building on top of requirement 1, this would allow for a visual import of custom WSL images from a remote location (maybe a JSON file?)
3 Set default user for distro Either by editing /etc/wsl.conf or setting Lxss registry keys
4 Set any WSL user's password By executing the default WSL shell as root and running chpasswd
5 General WSL "engine" configuration Basically a visual editor of %USERPROFILE%\.wslconfig with checkboxes etc.
6 Export WSL distro as .tar.gz file Useful for backup/restore processes
7 Set distro name Organization is key
8 Uninstall a distro Sometimes it's good to start fresh

I have written a WSL GUI myself which tackle these specific needs. I'll see whether or not I can open-source it.

Screenshots

To give you a better idea of what I did, here are some screenshots.

wslinstaller is still running in the background:
wslinstaller is running

No WSL distro found:
no WSL distro found

Microsoft Store based WSL distro found:
store distro found

Set distro name dialog:
set distro name dialog

Uninstall distro dialog:
uninstall distro dialog

Install distro dialog:
install distro dialog

WSL "engine" configuration (%USERPROFILE%\.wslconfig):
wsl engine configuration

Here, changing the Sparse VHD setting is not available because when installing/importing a distro, I perform this WSL command as one of the last steps:

wsl --manage <distro_name> --set-sparse true

Hence, the VHD will always be sparse and the user - as well as IT support - doesn't have to worry about it.

@Etsija
Copy link

Etsija commented Mar 26, 2024

I would definitely add an option to compact existing non-sparse VHDs - as I just recently spent many working days in trying many different options for that, desperately searching for information from articles and SO on how to compact my distro's VHD, which was over 200GB and ever-increasing, threatening to fill out my hard disk drive! I was actually on the brink of switching to an all-Linux laptop - and still have the Ubuntu stick readily available, should there come a need for it...

(Finally, the solution that helped me was to use Hyper-V - but this option is not available for Windows Home users.)

Managing your disk drive space shouldn't require deep knowledge about VHDs I think. There should just be an option/action in the UI to "compact" your existing disks. I am a front-end developer, not a hardware specialist, and I use my laptop to develop software and shouldn't have to need to overcome hurdles like this.

@markus-actc-aberle
Copy link

I am running Llama2 in WSL using also the NVIDIA GPU.
And I'd like to switch in on an off to safe electricity and thermal dissipation in my office.

@julianschweizer
Copy link

Please add: Open folder of the distro

@pirafrank
Copy link

Please add: Open folder of the distro

This has been possible for a while in Windows Explorer.

@ParksProjets
Copy link

I think it would be great if we can configure network settings, especially NAT or bridge mode in the GUI. Because for now, you have to execute some obscure Powershell commands to do that.

@thetredev
Copy link

Being able to configure a static IP address for a distro would also be very useful.

@pa-0
Copy link

pa-0 commented May 24, 2024

It would be great if we could get Dev Home integrated as an optional Profile in Terminal. Similar (but not really) to the way PowerShell/Bash install as standalone shells with the option to configure profiles in the Terminal app. I think it would make for a cool 'Home' page somewhat akin to a customizable "new tab" in Edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature New feature or request Needs-Community Feedback We need additional help with how something should act / look Needs-Spec A spec should be written for this feature
Projects
None yet
Development

No branches or pull requests