Giter Site home page Giter Site logo

Comments (12)

RoliSoft avatar RoliSoft commented on July 19, 2024 5

Good news on the this front. I looked at the new insider builds, and it seems that there is a new API to list, install and uninstall distributions. Furthermore, they are pretty easy: wslapi.dll's WslRegisterDistribution(const wchar_t *distributionName, const wchar_t *tarGzFilename) function will take care of everything, including extracting the .tar.gz properly.

Thankfully the openSUSE distribution came with a non-stripped .exe and a .pdb, so I was able to get a lot of information out of it on how it interacts with the new API.

I will soon update the script to use these APIs and register each new distribution as a "proper" distribution in WSL.

from wsl-distribution-switcher.

biax avatar biax commented on July 19, 2024

while at it, if you don't mind, do verify if archlinux/voidlinux are working on creators update.

i was only able to install ubuntu zesty. nothing else worked. i managed to install greyltc/archlinux but behavior is weird. example: i press backspace, i get a space instead.

from wsl-distribution-switcher.

 avatar commented on July 19, 2024

Regarding the strange terminal behaviour, perhaps you are also suffering from issue #50.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

I don't think this project is being maintained anymore. I haven't heard from Roli in months.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

Sorry about the radio silence. I was focused on some personal stuff and getting my OSCP. But I did all of those now, and after this weekend's vacation, I should be back in full force.

There are already a few things I wanted to implement in the project, so keep in the lookout for updates.

Recently, Microsoft announced they'll support Fedora and other distributions through the Windows Store. We'll have to wait and see how they implement the switching or if they'll offer a way to run multiple distributions at once, I'll try to mimick/support what they do, in order to have better user experience with the script.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

@RoliSoft I got it for you:

microsoft/WSL#2212 (comment)

Read from my comment down =).

Not sure how long they're going to support legacy method %localappdata%\lxss , but the new registration method uses the AppX bridge (project centennial) together with some privately released kit that they're planning to open up to noncommercial distros sooner or later.

As long as they support the legacy location (install Ubuntu 16.04 Legacy with lxrun /install), your script should work without much modification, but if they move to an AppX-only model (removing legacy support), you'll have to integrate some self-signing appX tech and also require people to download the AppX bridge SDK probably (or you could remove and replace the AppX's package directory of another distro).

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

The self-signed AppX will probably only be useful if we want to support wslconfig /register.

Other than that, I don't suppose they'll store the rootfs in some encrypted store, so we should be able to completely replace the default distro's rootfs, regardless where the location is.

And if they do store it encrypted, I've seen distributions switched while OS is booted (e.g. someone did it on DigitalOcean to install Arch on an active Debian image, after Arch was discontinued) so we should be fine. (Although Windows behaves differently with opened/locked files, I'm not 100% sure performing this stunt will work under WSL.)

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

@RoliSoft the store is not encrypted, I even gave the path for it in OpenSuse. That's why I said "(or you could remove and replace the AppX's package directory of another distro)".

from wsl-distribution-switcher.

SRGOM avatar SRGOM commented on July 19, 2024

@RoliSoft Sorry for bothering here but can you approve my pull request? I believe it makes things much easier for users of your package by fixing resolution issues.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

@SRGOM Sorry about that, will review it today and approve it.

from wsl-distribution-switcher.

SRGOM avatar SRGOM commented on July 19, 2024

No worries. Whenever you have time. If it helps you review, the change is in the hook script and adds a single comment to /etc/resolv.conf (when WSL sees that comment, it copies Windows' DNS resolution)

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

hahaha, holy shit. That's amazing! Can you even extract and register distros put in any old location?

from wsl-distribution-switcher.

Related Issues (20)

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.