RoliSoft / WSL-Distribution-Switcher

Scripts to replace the distribution behind Windows Subsystem for Linux with any other Linux distribution published on Docker Hub.
MIT License
1.68k stars 185 forks source link

no lxss #95

Open guai opened 5 years ago

guai commented 5 years ago
Microsoft Windows [Version 10.0.17134.254]

I already have ubuntu wsl installed from the store and it works. I wanted to install centos also.

D:\WSL-Distribution-Switcher-master>install.py centos:latest
[*] Probing the Linux subsystem...
[!] The Linux subsystem is not installed. Please go through the standard installation procedure first.

ALAICS, the check looks like this os.path.join(os.getenv('LocalAppData'), 'lxss') and there actually no lxss dir in %LocalAppData%

melak47 commented 5 years ago

Windows now supports multiple distributions natively. The downside is that this project doesn't work out of the box anymore. You need to create a launcher for your custom distro: https://github.com/Microsoft/WSL-DistroLauncher

You can still use the scripts from this repo to get a tarball of the distro you want, and use that as install.tar.gz for the WSL-DistroLauncher you're creating.

benzBrake commented 5 years ago

you can try this fixed version: https://github.com/benzBrake/WSL-Distribution-Switcher

sarawgeek commented 4 years ago

if you are trying to install package like Kali, then this switcher is hardcoded to look for debian package only, so you can go and change ->go to %LocalAppData% in Run window -> Copy the folder name of your package, in my case it was "KaliLinux.54290C8133FEE_ey8k8hqnwqnmg" -> go inside WSL-Distribution-Switcher folder and open utils.py -> go to function probe_wsl(silent=false) -> change the packagesSubFolder Now try. you might get some debian.exe related error, in that case, do this after above steps -> go to install.py -> find this call -> get_lxss_user() -> remove this call and assign values like this uid=0 gid=0 user='root'