# wsl **Repository Path**: wenl4ng/wsl_1 ## Basic Information - **Project Name**: wsl - **Description**: Port openEuler to WSL (Windows Subsystem for Linux) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 14 - **Created**: 2024-05-13 - **Last Updated**: 2025-09-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # openeuler WSL support Openeuler distribution launched through Microsoft launcher ## build status [![Build WSL](https://github.com/pkking/openEuler-wsl/actions/workflows/wsl.yaml/badge.svg?branch=main)](https://github.com/pkking/openEuler-wsl/actions/workflows/wsl.yaml) ## install 1. You can download the artifacts in the action. If it is more than 30 days old, github will automatically clean up old artifacts and can be regenerated by re-run. 2. Currently, the sideload method is supported to load openeuler applications: 1. After unzipping `sideload-xxx.zip` , enter the `DistroLaucher-xxx_Test` directory 2. Load the certificate `xxx.cer` file in the directory, for reference, in simple terms: 1. Double-click `xxx.cer` 2. Select `local machine` 3. Select `trusted people` 3. Double-click `DistroLauncher-Appx_xxx_.appxbundle` to install the openeuler WSL application ## roadmap - [ ] Support for other launchers([wsldl](https://github.com/yuk7/wsldl),[wsl-distrod](https://github.com/nullpo-head/wsl-distrod)) - [x] Integrate with the openeuler release process to continuously release LTS versions of wsl rootfs and sideload applications - [x] Build APP and rootfs in openEuler's infrastructure, `github action` customized by user developers - [x] 20.03 LTS SP3 is available in Windows Store - [x] 22.03 LTS available on windows store - [x] 22.09 Launched in windows store - [x] systemd works normally and namespace is enabled ## contribution You're welcome ## LICENSE MIT # how to customize my own WSL 1. fork this repository 2. Modify the code of this warehouse as needed (for example, if you want to add or delete packages, you can modify `docker/Dockerfile` ) 3. Generate a self-signed certificate according to this document, with the suffix pfx. For example, the following is a self-signed certificate valid for 5 years. ``` New-SelfSignedCertificate -Type Custom -Subject "CN=openEuler Infra WSL" -TextExtension @("2.5.29.37={critical}{text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}") -KeyUsage DigitalSignature -FriendlyName "openEuler" -CertStoreLocation "Cert:\CurrentUser\My" -NotBefore (Get-Date) -NotAfter (Get-Date).AddYears(5) ``` 4. Export certificate: ``` $password = ConvertTo-SecureString -String -Force -AsPlainText Export-PfxCertificate -cert "Cert:\CurrentUser\My\" -FilePath .pfx -Password $password ``` 5. Note that the certificate exported at this time contains the private key and the private key is encrypted with a password. You can refer to here to remove the password. ``` openssl pkcs12 -in -nodes -out temp.pem -password pass: openssl pkcs12 -export -in temp.pem -out -password pass: ``` 6. The certificate can be converted to `base64` format using the following command: ``` certutil.exe -encode ``` 7. Modify the `Publisher=` field in `DistroLauncher-Appx/MyDistro.appxmanifest` and change it to be consistent with the CN field of the certificate above 8. Modify the `` field in `DistroLauncher-Appx/DistroLauncher-Appx.vcxproj` and change it to the fingerprint of the above certificate and the certificate `CN` field to obtain `CN` / `PackageCertificateThumbprint` The method is as follows: ``` PS C:\> Get-PfxCertificate -FilePath .\DistroLauncher-Appx_TemporaryKey.pfx Thumbprint Subject ---------- ------- asdfsadfadfs9asdfasdfsadfE1FC8AC90C26DE1 CN=xxxadsfasdfsadf ``` ## No Microsoft developer account and Azure AD 1. Enter the warehouse `setting->secrets->actions->new secrets` and create the following secrets - SIGN_CERT: The content is the base64 encoding of the certificate. The base64 encoding generation method is: ``` $fileContentBytes = get-content 'YOURFILEPATH.pfx' -Encoding Byte [System.Convert]::ToBase64String($fileContentBytes) ``` ## Have a Microsoft developer account 1. fork this repository 2. Enter the warehouse `setting->secrets->actions->new secrets` and create the following secrets - AZURE_AD_APP_KEY - AZURE_AD_CLIENT_ID - AZURE_AD_TENANT_ID - SIGN_CERT For these variables of AZURE, please refer to the steps here. To generate SIGN_CERT, please refer to the steps above. After modification, click `run workflow` in `actioin` to generate the corresponding WSL software package (if you do not have a developer account or do not want to publish it to the app store, `Should we upload the appxbundle to the store` Please enter `no` for this parameter, otherwise enter `yes` ). In the summary page of the corresponding task, you can download all the generated `artifacts` , among which `rootfs-xxx` is the file system used to make WSL, `siteload-xxx` is the app package that can be installed directly by double-clicking, `storeupload-` is the app package used to upload to the Microsoft Store Note: The script in this warehouse can only update submissions of existing applications, so newly created applications need to be submitted manually for the first time. You can refer to how to submit manually.