Giter VIP home page Giter VIP logo

wsl2-distro-manager's Introduction

Welcome to WSL Manager ๐Ÿ‘‹

GitHub Release Date GitHub Workflow GitHub release (latest by date) Documentation GitLab stars Discord

English | ็ฎ€ไฝ“ไธญๆ–‡ | Deutsch | Espaรฑol

Screenshot with Darkmode

Preview with Lightmode

Screenshot with Lightmode

WSL Distro Manager is a free and open source app that provides a user-friendly graphical interface for managing Windows Subsystem for Linux (WSL) distributions. With WSL Distro Manager, you can easily install, uninstall, update, backup and restore WSL distros, as well as configure their settings and launch them with a single click. WSL Distro Manager also offers some extra features to enhance your WSL experience, such as sharing Distros between multiple machines, and creating actions to quickly do repetitive tasks. Whether you are a beginner or an expert in WSL, WSL Distro Manager will help you get the most out of it.

๐Ÿš€ Features

  • Manage WSL instances
  • Download and use Docker images as WSL instances - without Docker!
  • Quick Actions (execute pre-defined scripts directly on your instances for quick configurations)
  • Download and use Turnkey or other LXC containers (experimental, tested with e.g. Turnkey WordPress)
  • Use your own repository for rootfs' or LXC containers
  • and more...

๐Ÿ“ฆ Install

Microsoft Store

This app is available on the Microsoft Store.

Direct download

You can get this app with a direct download from the Releases page. The latest version is available as a zip file.

Install via Winget

The winget package is outdated! Please use the Windows Store version instead.

winget install Bostrot.WSLManager
Install via Chocolatey

This package is maintained by the community (@mikeee). It is not an official package.

choco install wsl2-distro-manager
Install a nightly build

The last build can be found as artifacts in the "releaser" workflow or via this link. If you rather prefer an unsigned msix you can also use this link.

โš™๏ธ Build

Make sure flutter is installed:

flutter config --enable-windows-desktop
flutter upgrade

flutter build windows # build it
flutter run -d windows # run it

Author

๐Ÿ‘ค Eric Trenkel

๐Ÿ‘ฅ Contributors

Contributors

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check the issues page. You can also take a look at the contributing guide.

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2023 Eric Trenkel.
This project is GPL-3.0 licensed.


Not found what you were looking for? Check out the Wiki

wsl2-distro-manager's People

Contributors

arziel1992 avatar bostrot avatar joutvhu avatar paulovnas avatar phanirithvij avatar xxnuo avatar yclywz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wsl2-distro-manager's Issues

Support for Profiles in Windows Terminal

Is your feature request related to a problem? Please describe.
When I launch Windows Terminal from the app, it always uses the default profile (color, etc.)

Describe the solution you'd like
If there is a profiles that match the WSL instance, use it.

Describe alternatives you've considered
As an alternative allow user to select profile in app.

Additional context
Nice app

Open in vscode

Describe the solution you'd like
A button to start vscode for a WSL instance.

Additional context
Might be useful to get into the right distro right away.

Crashed my PC when creating a new distro

Describe the bug
I tryed to create a Ubuntu 20.04 distro on Windows 11.
In the mid of the distro download there was some error I couldn't read, then the screen went black and I had to forcefully restart my PC.

To Reproduce
Steps to reproduce the behavior:

  1. Add a distro (Ubuntu 20.04) on a secondary drive

Expected behavior
A newly created wsl distro

Screenshots
Couldn't take it

Desktop (please complete the following information):

  • OS: Windows 11 Education 22H2 Build 22621.963
  • Version 1.5.0
  • WSL Version WSL version: 1.0.3.0
  • Source GitHub releases

Synchronize instances over local network

Is your feature request related to a problem? Please describe.
When using multiple devices it is easy to mix up different distros and environments.

Describe the solution you'd like
Synchronize the filesystems by comparing the ext4 filesystem hashes and uploading/downloading over local network.

Describe alternatives you've considered
Manually transfering the filesystems between multiple machines.

Additional context
For network discovery this, file server. Then just downloading it over http.
To help with accidentally overriding instances a manual sync button should be there so we could override either instance.

Spaces in name result in failed parameter

Describe the bug
Spaces in the distro name results in the error failed parameter.

To Reproduce
Put a space in the name while creating a distro

Expected behavior
Create a distro

Additional context
Replacing spaces and special characters should do the work. The label can stay the same.

White background in dropdown section with darkmode

Describe the bug
Background in the dropdown "select distro" from the "create distro" dialog has a white background in dark mode:

Expected behavior
The background should be the dark mode color.

Screenshots

Desktop (please complete the following information):

  • Version 1.4.4

Hide distros until they are done processing the creation commands

Description
Some distro processes might take a while to complete (e.g. setting up user environment/default user/fake systemctl). So the distros already show up when they are still being worked on. Starting one of the distros while it's being worked on might interrupt this process.

Solution
Hide the distro while it's not done.

Add Network Bridging options from .wslconfig (newer wsl builds)

Is your feature request related to a problem? Please describe.
Would be nice to be able to add/manage network bridging (from recent WSL builds via .wslconfig file). Maybe simply open file to add entries? Or manage other options via .wslconfig file from within WSL Manager GUI?

Describe the solution you'd like
Enable/Disable Network Bridging in WSL instance!

Describe alternatives you've considered
Msgbox showing/explaining how to enable?

Additional context
I personally like to keep things isolated in a single folder to make things easier to move around as needed.
Im sure as WSL matures more and time permits you will add more things/ways to manage WSL. In the meantime keep up the great work. im digging it!

Multilanguage Support

I found the project very interesting.
CMD is good but the GUI is always welcome.

I wanted to know if you have the possibility to include a multilingual system for the basic options, it would be nice and I'm sure a lot of people would help with localization.

As the options are very simple.. The location would be quiet.

If you allow, I can do that, it would be very good for the tool.

Directory/name mixed up for new distro

I tried to create a second Ubuntu 20.04 version using the tool.
As name I chose Ubuntu-Home, and for "Save location" I clicked on the folder icon, navigated to "D:" and created a new folder "wsl2".

After that my running ubuntu 20.04 instance was terminated without any warning (which is another bug, imho).

Then the tool's windows shows "Creating Ubuntu-Home. This might take a while..." and disturbingly shows "No distros found." (which hopefully also is another bug - or did it delete my existing distro?).
Because it really was taking quite a while and nothing at all happened in the newly created "D:\wsl2" directory, I opened Process Explorer to check if it's doing anything at all.
I noticed a process another process that is doing an wsl export to "D:\wsl2Ubuntu-Home" - notice the missing "".

Ok, finally I ended up with a working second distro, just with the wrong name in the wrong location.

Thankfully, my existing distro still works, so I guess the "No distros found" should be "Distro configuration in process" or something.

Older Windows 10 Builds - compatibility issues

As this is mainly programmed on Windows 11 with it's more tightly integrated WSL environment some features do not work as good or even don't on Windows 10.

Here is some stuff I have encountered. Feel free to add anything:

  • In WSL terminal code . is not recognized.
  • Open folder just opens explorer not the WSL destination although explorer.exe . works in the terminal.
  • "Open with VS Code" button doesn't open it (always).

This might be very specific to the Windows 10 Pro 20H2 Build 19042.1586 with WSL 2.

EDIT: After updating Windows (still on Windows 10) following happens with code .

Updating VS Code Server to version e18005f0f1b33c29e81d732535d8c0e47cafb0b5
Removing previous installation...
ERROR: Failed to download the VS Code server. 'wget' not installed.
Please install wget:
Debian/Ubuntu: sudo apt-get install wget

Latest debian rootfs doesn't have wget pre-installed so maybe check for wget before trying to start code . and show an error message.

Default distro location is not used by copy command

Describe the bug
Default distro location is configured to D:\WSL however copy command saves files into C:\WSL2-Distros.

To Reproduce
Steps to reproduce the behavior:

  1. Configure default location in settings.
  2. Import WSL2 distro.
  3. Click Copy to create distro copy

Expected behavior
Expect copy to be created under location configured as default.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • WSL Manager v1.1.0

App crashing when maximizing window

Describe the bug
When I maximized the app, it crashes

To Reproduce
Steps to reproduce the behavior:

  1. Open app
  2. Maximize the app
  3. See errors

Expected behavior
Maximize the window

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11 Pro 22H2]
  • Version v0.5.0
  • WSL Version: 1.0.3.0
  • Source: Github Releases

Additional context
Add any other context about the problem here.

reader writer

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 11 Pro Insider Preview Build 22471]
  • Version [e.g. v0.4.0]
  • Source [e.g. GitHub releases, GitHub master, Windows Store]

Additional context
Add any other context about the problem here.

Cloning a distribution is getting stuck on copying

Describe the bug
When I try to clone a distribution, the message "Copying [...]. This might take a while..." and won't go away. If I restart the WSL Manager, both distributions are there and can be used.

To Reproduce
Steps to reproduce the behavior:

  1. Download WSL Manager
  2. Create a distribution (used focal-server-cloudimg-amd64-wsl.rootfs.tar.gz, with default save location and specified a default user)
  3. Try to clone the distribution

Expected behavior
After the cloning process, the alert should disappear and the manager should be usable again.

Screenshots
image

Desktop:

  • OS: Windows 11 Pro 10.0.22000 Build 22000
  • Version: v0.7.1
  • Source: GitHub releases

Error when WSL is not installed

Describe the bug
When WSL is not installed the list will contain the error code from the commandline divided on the listtiles.

To Reproduce
Steps to reproduce the behavior:

  1. Uninstall wsl
  2. Start the GUI

Expected behavior
Show an error message that wsl is not installed or even show a little install guide.

Desktop:

  • OS: Windows 11 Pro Insider Preview Build 22489
  • Version: v0.5.1+
  • Source: all

Screenshots:

Error when creating a instance without specifying a Save Location

Describe the bug
When I create an instance but do not specify a Save Location, the instance never gets created. The status message still appears saying that the instance is being created when in reality it never really started.

I did some debugging and found out where was the error occurring. I'm not an expert in Flutter but the errors seem to happen when getting the key SaveLocation from the preferences:

statusMsg('Creating instance. This might take a while...',
loading: true);
String location = locationController.text;
if (location == '') {
location = prefs.getString("SaveLocation")!;
location += '/' + name;
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Home screen
  2. Click on 'Add Instance'
  3. Give your instance a Name
  4. Select a Distro
  5. Leave the Save Location text input blank
  6. Click on 'Create'
  7. In the debugging console you should see the following error (see Screenshots)

Expected behavior
A default value should be supplied if the SaveLocation does not exists in the preferences

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 Home Build 10.0.19044
  • Version: v0.8.0
  • Source: GitHub master

Additional context
Nothing to add

Add "Quick install" panel

Is your feature request related to a problem? Please describe.
When dealing with a lot of different instances it might come in handy to have a panel for quick installing /or executing of predefined code.

Describe the solution you'd like
A panel where you can add quick install buttons that execute pre-defined code to install / configure your instance.

SharedPreference Path_name is not set on copy

Describe the bug
The SharedPreference Path_name is not set when copying an instance.

To Reproduce

  1. Create instance.
  2. Copy instance
  3. See in %appdata%\com.bostrot\WSL Distro Manager that Path is not set for the new instance

Expected behavior
It should add the path for the new instance

Desktop (please complete the following information):

  • Windows 11 21H2 22000.1219
  • Version 1.4.4
  • WSL Version 1.0.0.0
  • Windows Store/GitHub

Error downloading any distro

Describe the bug
When creating a new instance with any distro / Turnkey, the application starts "creating the instance", then quickly changes to "Error downloading: [any distro].

To Reproduce
Steps to reproduce the behavior:

  1. Go to Add an Instance
  2. Select any available distro
  3. Click Create
  4. See error at bottom of application

Expected behavior
The application should download the distro or turnkey

Desktop (please complete the following information):

  • OS: Windows 11 Pro 21H2, Build 22000.708
  • Version 10.0.22000
  • Source: Windows Store

Additional context

  • Ran application as regular user
  • Ran application as admin user
  • Changed "Extra repo for Distros" to known good repo
  • Changed download location from C:\WSL2-Distro to C:\Users[Name]\WSL2-Distro

WSL debugShell

The debug Shell was introduced with WSL v0.51.0.
It would be nice to have that added to the settings.

Incorrect positioning of tooltips for distro icons causes the tooltips to pop in then instantly disappear when mousing over the icons

Describe the bug
The Open with File Explorer, Open with VS Code and Settings icon tooltips in each distro's section is wrongly positioned and pops in then disappears when I mouse over the folder icon. The tooltips for the Copy, Rename and Delete icons are all positioned correctly.

To Reproduce
Steps to reproduce the behavior:
See the attached screencap.

Expected behavior
The tooltips should all be positioned to the right of the mouse cursor

Screenshots
https://user-images.githubusercontent.com/97291028/189522855-36d9f0c1-11ae-430d-8df8-7254aa275711.mp4

Desktop (please complete the following information):

  • OS: Windows 11 Pro Insider Beta Build 22621
  • Version: v1.4.0
  • Source: GitHub releases

Dark mode tooltips are dark grey with black text

Describe the bug
All tooltips in the UI are almost unreadable black text on dark grey tooltips when the app is running in dark mode.

To Reproduce
Steps to reproduce the behavior:

  1. Start the app
  2. Mouse over any of the 5 icons on the left nav bar
  3. Examine the tooltip that appears

Expected behavior
The text on the dark mode tooltips should be a light colour or just white

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11 Pro Insider Preview Build 22621
  • Version: v1.4.0
  • Source: GitHub releases

v1.2.1 doesn't show the UI

Describe the bug
Installed the new version v1.2.1, launched it and there is no UI / window showing up. But looking at the task manager, there is a process called "A WSL GUI.", so it seems that it's running.. Downgraded to v1.1.0 and it's working again..

Desktop (please complete the following information):

  • OS: Windows 11 Pro 10.0.22000
  • Version: v1.2.1
  • Source: GitHub releases

Missing Docker distros

Describe the bug
Docker distros are not in the list.

To Reproduce
Steps to reproduce the behavior:

  1. Install Docker Desktop
  2. Enable Integration with default WSL distros in Docker Desktop
  3. Run wsl -l -v in the console and compare the result with Manager list.

Expected behavior
WSL Manager shows the same list as CLI.

Screenshots
image

Desktop (please complete the following information):

  • OS: [e.g. Windows 11 Pro Insider Preview Build 22000.1335]
  • WSL Manager 1.5.0
  • WSL Version: Kernel version: 5.10.102.1
  • Source [e.g. GitHub releases, GitHub master, Windows Store]

Error in 'Open with File Explorer'

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Open with File Explorer' on any distro
  2. The app attempts to open \\wsl.localhost\{DISTRO_NAME}
  3. See error

Expected behavior
The correct path (well, at least on my machine) is \\wsl$\{DISTRO_NAME}

Screenshots
image
The correct path :
image

Desktop (please complete the following information):

  • OS: Windows 10 21H1
  • Version: 1.3.3
  • Source: Windows Store

installation via cmdlet winget

push the releases from this app in the winget database, so it can be easily avaliable for other dev's.
winget is the official microsoft cmdlet for app installation through command line, a lot of dev is using to automate the instalation and setup of a windows environment, and appers that any app can be avaliable since the main source of packages is maintained by community

[BUG] Toggling dark mode causes unsaved changes to be lost.

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Toggling dark mode causes unsaved changes to be lost.

Expected Behavior

Toggling dark mode should not discard changed but unsaved settings, or there should be a warning that toggling dark mode will cause unsaved changes to be lost.

Steps To Reproduce

  1. Go to Settings.
  2. Change some settings.
  3. Without saving, toggle dark mode.
  4. All changed but unsaved settings are reset.

Environment

- Windows Version: Windows 11 Enterprise 22621
- WSL Distro Manager Version: v1.5.0
- WSL Version:  ``` wsl --version ``` **does not work.**
- wsl --status
  - Default Distribution: v21.04-Ubuntu
  - Default Version: 2
  - Windows Subsystem for Linux was last updated on 2022-03-26
  - WSL automatic updates are on.
- Source: GitHub releases (for WSL Distro Manager)

Anything else?

No response

Add `/etc/wsl.conf` on distro creation, if default user is specified

Is your feature request related to a problem? Please describe.
When I create a new distro with a default user specified, it doesn't create the /etc/wsl.conf. If I open the distro through the commandline or if I use code [folder] to open vscode with wsl integration, it's always starting as root.

Describe the solution you'd like
Would be nice to also generate a /etc/wsl.conf where the default user is set.
https://docs.microsoft.com/en-us/windows/wsl/wsl-config#user-settings

Creating "C:\WSL2-Distros" when Run from "D:\"

Describe the bug
Love the simple WSL GUI!

I have changed/saved the "Default Distro location" from C:\WSL2-Distros" to another folder (actually a subfolder of wsl2distromanager.exe. When I launch wsl2distromanager.exe it still creates C:\WSL2-Distros folder. Is this on purpose?
The Main GUI looks to show the correct folder but whenever I create a new ubuntu instance it creates C:\WSL2-Distros\distros....

Also any plans to add a button or something to set/enable the new bridging capabilities recently added to newer builds of WSL via .wslconfig file?

Desktop (please complete the following information):

  • OS : Windows 11 Pro x64 22000.469 (21H2)
  • Version : v0.7.1
  • Source [e.g. GitHub releases, GitHub master, Windows Store]

After creating a new instance the instance list is not updated

Describe the bug
When creating a new instance the instance list is not updated once it is complete and it is still showing the loading status message.
Only tested on fresh Windows with no other instances so maybe only happens for the first.

To Reproduce
Steps to reproduce the behavior:

  1. Create instance with Name, Distro Debian, User filled in. The rest blank.
  2. Wait for finishing (wsl --list shows the instance)

Expected behavior
Update the list once the instance is created.

Additional context
Maybe periodic checks or reloads would help here.

Screen size

My laptop has a screen resolution of 3480x2160 . . . and therefore there is a scale factor in display of 250%. WSL2 manager does not preserve the screen size with which it is resized, so starting up always comes out with a tiny screen that needs to be enlarged. This does not happen in other apps.

v1.4.0: Does not start plugin DLLs missing?

Describe the bug
The latest version does dot start. 3 error messages state that the following are missing:

screen_retriever_plugin.dll
flutter_acrylic_plugin.dll
window_manager_plugin.dll

To Reproduce
Steps to reproduce the behavior:

  1. Copy contents of _wsl2-distro-manager-v1.4.0.zip"_to a folder
  2. Double-click on wsl2distromanager.exe
  3. Error messages state that the DDLs are missing

Expected behavior
Open WSL2 Distro Manager

Desktop (please complete the following information):

  • OS: Windows 10 Enterprise 21H2 Build 19044.1826

Add user on create of new distro

Is your feature request related to a problem? Please describe.
Starting a newly created distro starts as root user. This might not be wanted and recreating a new user every time is tedious.

Describe the solution you'd like
Try to create a user when the distro is created. Maybe even with sudo.

Additional context

install sudo
useradd test
usermod -aG test sudo
usermod -s /bin/bash
create home with permissions
set user as default

Ability to change default starting directory

Upon launching the cli from WSL2 Distro Manager, the starting directory is System 32. I have edited my JSON file for Windows Terminal to start WSL cli's in /home/%username%, but it doesn't seem to load from the JSON at least.

Better status msgs for "Creating distros"

Title says it all. The status messages are very undetailed. Currently it just knows "loading" or "not loading" so including some kind of log would help already.

This would be very helpful especially when downloading a distro which can take some time.

ARM support for creating distros

This should be fairly simple. The only thing that currently keeps this from working is that the Create functions downloads an amd64 rootfs.

So adding arm rootfs' to the download list and checking whether we are running on arm or not should be enough.

Quick Acions

  • No documentation on how to use feature
  • Attempts to run quick action in "Ubuntu" only bring up new terminal window but don't action the script

Latest Ubuntu 22.04 release contains no wsl-rootfs

https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64-wsl.rootfs.tar.gz doen't exist.

https://cloud-images.ubuntu.com/releases/22.04/release-20220923/ is the latest release with the ubuntu-22.04-server-cloudimg-amd64-wsl.rootfs.tar.gz.

This is not really a bug and I don't know what to do about it either, because being locked to a particular version a) involves maintenance and b) you obviously won't always get the latest version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.