
WSL Dev Skips Microsoft's 'Export-Delete-Reimport' Nonsense, Hacks Registry for Instant Renames and Yoinks OCI Images Sans Docker Bloat
The development of WSL-UI, a user interface for Windows Subsystem for Linux, involved overcoming significant technical challenges, particularly with renaming distributions and importing from container registries. Renaming distributions required modifying the Windows Registry, specifically the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss key, which stores distribution information. However, this process must be done while the distribution is stopped, and also involves updating Windows Terminal profiles, Start Menu shortcuts, and potentially WSL config files. Importing distributions from container registries, such as Docker Hub, was achieved by leveraging the Docker Registry HTTP API V2, handling authentication and downloading layers. To merge these layers into a usable rootfs on Windows, the developers had to work around Windows' limitations with Linux symlinks by merging layers in tar format. The WSL-UI project is open source and available on the Microsoft Store, with the developers planning to detail their experience with MSIX packaging and the Partner Center in future updates.