SlideShare a Scribd company logo
My journey from early
Linux, through Snap
packaging, to WSL
Dani Llewellyn (diddledani) she/her
09/11/2022 Dani Llewellyn 2
My Background
●
Linux user since ~1997-8
●
Web, Desktop, and Server dev/admin experience
●
Windows, macOS, and Linux
●
Single System Image Beowulf-style clustering ~2001-5 (OpenMosix)
●
Ran Gentoo for a decade learning a LOT
●
Learned high-availability techniques via tools like CoroSync and Pacemaker
●
Have since forgotten it all 😛
●
Used Docker and containerisation since Docker first appeared
●
Primary contributions to Snaps/Snapcraft, WSL2, and Ubuntu Mate
●
Featured multiple times on the Ubuntu.com Blog
●
Ubuntu Member February 2018
●
Ubuntu Membership Board September 2018-present
●
Microsoft MVP primarily for WSL-related community work
09/11/2022 Dani Llewellyn 3
First contributions
09/11/2022 Dani Llewellyn 4
Discovering Snapcraft
●
Followed the Ubuntu Phone
project avidly
●
Inspired by the Click
Packaging system
●
Ubuntu Phone ceased
development
●
Snap Packaging arose from
the ashes
09/11/2022 Dani Llewellyn 5
Heavily invested in Snaps
●
My involvement in Snap Packages and Snap ecosystem
snowballed
●
Became the go-to expert on Snap Packaging
●
Regularly consulted by Canonical employees
●
Attendee of multiple Snapcraft Summits
●
Invented multiple techniques for improving and simplifying
Snap Packages
●
Fully committed to their future
09/11/2022 Dani Llewellyn 6
In the beginning, there was WSL
●
An emulation layer, often compared to WINE
●
Uses “picoprocesses”
●
Filesystem handled via NTFS
●
The root filesystem tree is stored as native NTFS file entries
●
Each file in the distro is a separate file in NTFS
●
Some changes were made to NTFS to enable Linux file semantics to be stored
appropriately
●
Interop is possible
●
Access Windows files from Linux programs
●
Execute Windows programs from the WSL terminal
●
Use Windows programs to open files inside the WSL distro
09/11/2022 Dani Llewellyn 7
Then they said “let there be version 2”,
and there was version 2, and it was good
●
"Lightweight" Virtual Machine
●
Uses Hyper-v via the Host Compute Service
●
Doesn’t need the full Hyper-v management stack
●
Each distro is inside its own set of namespaces on a shared kernel
●
Filesystem handled via Virtual Disk Image
●
Uses real kernel from kernel.org with some MS patches
●
Patches primarily to enable better interoperation with Windows such as the DirectX driver for GPU
compute and 3D acceleration support (WSLg)
●
Runs at almost native speed
●
WSLg (Windows 11 only) allows graphical apps without running an X11 service on your
Windows desktop
●
Using real Linux means Systemd is possible and with it Snap Packages
09/11/2022 Dani Llewellyn 8
Wait, no Snap support?
09/11/2022 Dani Llewellyn 9
My work with WSL2: Systemd
●
Developed a technique to get Systemd running
●
Codified in https://github.com/diddlesnaps/One-Script-WSL2-Systemd
●
Used a nested process namespace
●
Required lots of hoop-jumping
●
Some issues with interaction
●
Getting VSCode Remote to reliably enter the namespace was difficult and regularly broke
●
Microsoft has now released Systemd support natively in Windows 11 as of 21st
September 2022 (via the Windows Store edition of WSL2)
●
This was heavily influenced by my proof, and those of alternative implementations like Genie,
that it is viable and in-demand
●
Canonical were ready to go their own way for Ubuntu, i.e. my way, if MS didn’t provide it natively
– they had an implementation ready to go long before MS announced native support publicly
09/11/2022 Dani Llewellyn 10
My work with WSL2: Snaps
●
My main focus for WSL2 was to get Snaps running after
Systemd was functional
●
Mostly it just worked once Systemd was running
●
Snaps ideally need Apparmor in the kernel for “Strict Confinement”
support
●
Microsoft’s provided kernel does not enable Apparmor as provided
●
To enable Apparmor a kernel rebuild is required
●
I have automated this rebuild at
https://github.com/diddlesnaps/WSL2-Linux-Kernel
09/11/2022 Dani Llewellyn 11
My work with WSL2: Hayden Barnes
●
Invited by Hayden to present my work on Snaps on WSL2 at the Mini WSLConf
●
Hayden consulted my expertise for input while writing his book: “Pro
Windows Subsystem for Linux (WSL): Powerful Tools and Practices for Cross-
Platform Development and Collaboration” published by Apress
●
I provided insights about interop such as how to use Outlook from WSL2 to send
emails by replacing the sendmail command
●
Investigated and documented managing WSL2 instances with:
●
Canonical’s Landscape
●
Microsoft’s InTune
●
Ansible
●
More besides...
09/11/2022 Dani Llewellyn 12
Current and Future Plans
●
Graphical Snap Applications via WSLg with 3D acceleration support
●
Needs more support from Snapd – I have an initial PR
●
I need to actually test it, re-roll, and improve it – Limited by inability to build the snapd snap until
I got my OCI container supporting core builds again recently
●
I want to ensure strict confinement works when WSL2 has AppArmor available
●
Automated Testing of WSL & WSL2 projects
●
Spinning up a matrix of Windows releases
●
Testing my project(s) against this matrix
●
Disposing of the test machines again
●
My VMs are currently broken when hosting Windows 11 22H2 though - investigating
●
Super Secret future project that I’m researching now
09/11/2022 Dani Llewellyn 13
Wait, Secret Project?
09/11/2022 Dani Llewellyn 14
The inspiration
●
Hayden Barnes posted this video to Twitter last year showing
XFCE on Windows login
09/11/2022 Dani Llewellyn 15
Investigations
●
I’ve been intensely investigating logind and user sessions
●
Thinking about the WSLg setup using a separate system container to host Wayland and
Weston
●
Maybe we can port the Weston changes to Mutter and other Wayland compositors to
support their use on WSLg by their various desktop environments
●
We need to know the WSL2 Hyper-V VM identity for Hyper-V Socket establishment by
Remote Desktop Connection client
●
This ID is currently exposed to the Weston in the system container by an environment variable set up
by the Microsoft init process, but we might be able to discover this in the distro container?
●
HCS does not expose this metadata easily for query via scripted calls into Windows from WSL2
●
We also need to be able to tell Remote Desktop Connection that desktop windows should
be bottom-most in the stack and never overlay Windows app windows or other WSL app
windows
09/11/2022 Dani Llewellyn 16
The Plan...
●
If this is indeed possible in the long run I plan:
●
Automatic start of Linux desktop environment using WSLg-style
GUI passthrough to Windows
●
Windows’ explorer.exe automatic launch on login will be replaced
by an automatic launch of our Linux desktop environment instead
●
Windows apps will have shortcuts forwarded to the Linux Desktop
Environment’s menu
●
This is the reverse to what WSLg currently does in putting the Linux apps
in the Windows start menu
09/11/2022 Dani Llewellyn 17
Why?
●
Will be mind-blowing if I get it going
●
Needs a lot of development time, and even more research
●
Will truly make the “Year of the Linux Desktop” naysayers sit
up and take notice, if it can be done
●
Even if they just ridicule it
09/11/2022 Dani Llewellyn 18
404: Demo not found
●
I hoped to have a very rough Proof of Concept but I didn’t
have time to get it going… also I left it far to late to even start
preparing it 🤦‍♀️
09/11/2022 Dani Llewellyn 19
Acknowledgements
●
Hayden Barnes (formally of Pengwin, also formally WSL lead at Canonical;
@unixterminal) and Nuno do Carmo (of Rancher Labs at SuSE; @nunixtech)
●
For helping me with WSL2 experiments and sharing their knowledge freely
●
Heather Ellsworth (Ubuntu Desktop team; @linux_flower) and Monica Madon
(former Ubuntu Community Respresentative; @communiteatime)
●
For being excellent friends and providing constant encouragement and moral support,
especially while I'm trying to find work that is suitable for my talents
●
Martin Wimpress (@m_wimpress), Alan Pope (@popey) both alumni of
the Snap Advocacy team
●
For recognising my capability and enthusiasm for the Snap Packaging world, inviting me
to Snapcraft Summits to share my knowledge, and encouraging me to get deeper into the
Ubuntu Community
09/11/2022 Dani Llewellyn 20
Where to find me
●
WSL Chat on Telegram (set up by Hayden Barnes):
https://t.co/TNYoOqS5P7
●
Ubuntu Discourse (diddledani)
●
Snapcraft Forum (diddledani)
●
https://github.com/diddlesnaps
●
https://github.com/diddledani
●
https://github.com/UbuntuAccomplishments
●
Twitter (@diddledani)
●
Mastodon (@diddledani@mastodon.lol)
●
Also: I’m currently looking for work 😉

More Related Content

PDF
Exploits of the Snapcraft Ninja
PPTX
Using Docker to boost your development experience with Drupal
PDF
Automated Snap Package build processes without the Build Service
PPTX
Containers not just for production nov8
PDF
Thinking inside the box (shared)
PDF
Docker for developers
PDF
Docker for developers
PDF
Docker based-pipelines
Exploits of the Snapcraft Ninja
Using Docker to boost your development experience with Drupal
Automated Snap Package build processes without the Build Service
Containers not just for production nov8
Thinking inside the box (shared)
Docker for developers
Docker for developers
Docker based-pipelines

Similar to My Journey From Early Linux, Through Snap Packaging, to WSL (20)

PDF
Getting started within the Ubuntu Community
PDF
Docker based-Pipelines with Codefresh
PDF
Docker containers : introduction
PDF
How Can OpenNebula Fit Your Needs: A European Project Feedback
PDF
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
PDF
Scale Big With Docker — Moboom 2014
PDF
Headless Android
PPTX
I wanna talk about nsenter
PDF
Development-Environment Up & Running with Docker
PDF
How can OpenNebula fit your needs - OpenNebulaConf 2013
PPTX
Deploying Windows Containers with Draft, Helm and Kubernetes
PDF
Next in Virtualization Era: Containerization & Docker
PDF
Docker Up and Running for Web Developers
PDF
Docker up and Running For Web Developers
PDF
Developer workflow with docker
PDF
Container Days
PDF
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
PDF
Survey of Container Build Tools
PDF
Leveraging Android's Linux Heritage at ELC-E 2011
PDF
A Shift from Monolith to Microservice using Docker
Getting started within the Ubuntu Community
Docker based-Pipelines with Codefresh
Docker containers : introduction
How Can OpenNebula Fit Your Needs: A European Project Feedback
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
Scale Big With Docker — Moboom 2014
Headless Android
I wanna talk about nsenter
Development-Environment Up & Running with Docker
How can OpenNebula fit your needs - OpenNebulaConf 2013
Deploying Windows Containers with Draft, Helm and Kubernetes
Next in Virtualization Era: Containerization & Docker
Docker Up and Running for Web Developers
Docker up and Running For Web Developers
Developer workflow with docker
Container Days
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
Survey of Container Build Tools
Leveraging Android's Linux Heritage at ELC-E 2011
A Shift from Monolith to Microservice using Docker
Ad

Recently uploaded (20)

PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
project resource management chapter-09.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Assigned Numbers - 2025 - Bluetooth® Document
A novel scalable deep ensemble learning framework for big data classification...
A comparative analysis of optical character recognition models for extracting...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TLE Review Electricity (Electricity).pptx
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25-Week II
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Zenith AI: Advanced Artificial Intelligence
project resource management chapter-09.pdf
1 - Historical Antecedents, Social Consideration.pdf
DP Operators-handbook-extract for the Mautical Institute
WOOl fibre morphology and structure.pdf for textiles
Enhancing emotion recognition model for a student engagement use case through...
Hindi spoken digit analysis for native and non-native speakers
Assigned Numbers - 2025 - Bluetooth® Document
Ad

My Journey From Early Linux, Through Snap Packaging, to WSL

  • 1. My journey from early Linux, through Snap packaging, to WSL Dani Llewellyn (diddledani) she/her
  • 2. 09/11/2022 Dani Llewellyn 2 My Background ● Linux user since ~1997-8 ● Web, Desktop, and Server dev/admin experience ● Windows, macOS, and Linux ● Single System Image Beowulf-style clustering ~2001-5 (OpenMosix) ● Ran Gentoo for a decade learning a LOT ● Learned high-availability techniques via tools like CoroSync and Pacemaker ● Have since forgotten it all 😛 ● Used Docker and containerisation since Docker first appeared ● Primary contributions to Snaps/Snapcraft, WSL2, and Ubuntu Mate ● Featured multiple times on the Ubuntu.com Blog ● Ubuntu Member February 2018 ● Ubuntu Membership Board September 2018-present ● Microsoft MVP primarily for WSL-related community work
  • 3. 09/11/2022 Dani Llewellyn 3 First contributions
  • 4. 09/11/2022 Dani Llewellyn 4 Discovering Snapcraft ● Followed the Ubuntu Phone project avidly ● Inspired by the Click Packaging system ● Ubuntu Phone ceased development ● Snap Packaging arose from the ashes
  • 5. 09/11/2022 Dani Llewellyn 5 Heavily invested in Snaps ● My involvement in Snap Packages and Snap ecosystem snowballed ● Became the go-to expert on Snap Packaging ● Regularly consulted by Canonical employees ● Attendee of multiple Snapcraft Summits ● Invented multiple techniques for improving and simplifying Snap Packages ● Fully committed to their future
  • 6. 09/11/2022 Dani Llewellyn 6 In the beginning, there was WSL ● An emulation layer, often compared to WINE ● Uses “picoprocesses” ● Filesystem handled via NTFS ● The root filesystem tree is stored as native NTFS file entries ● Each file in the distro is a separate file in NTFS ● Some changes were made to NTFS to enable Linux file semantics to be stored appropriately ● Interop is possible ● Access Windows files from Linux programs ● Execute Windows programs from the WSL terminal ● Use Windows programs to open files inside the WSL distro
  • 7. 09/11/2022 Dani Llewellyn 7 Then they said “let there be version 2”, and there was version 2, and it was good ● "Lightweight" Virtual Machine ● Uses Hyper-v via the Host Compute Service ● Doesn’t need the full Hyper-v management stack ● Each distro is inside its own set of namespaces on a shared kernel ● Filesystem handled via Virtual Disk Image ● Uses real kernel from kernel.org with some MS patches ● Patches primarily to enable better interoperation with Windows such as the DirectX driver for GPU compute and 3D acceleration support (WSLg) ● Runs at almost native speed ● WSLg (Windows 11 only) allows graphical apps without running an X11 service on your Windows desktop ● Using real Linux means Systemd is possible and with it Snap Packages
  • 8. 09/11/2022 Dani Llewellyn 8 Wait, no Snap support?
  • 9. 09/11/2022 Dani Llewellyn 9 My work with WSL2: Systemd ● Developed a technique to get Systemd running ● Codified in https://github.com/diddlesnaps/One-Script-WSL2-Systemd ● Used a nested process namespace ● Required lots of hoop-jumping ● Some issues with interaction ● Getting VSCode Remote to reliably enter the namespace was difficult and regularly broke ● Microsoft has now released Systemd support natively in Windows 11 as of 21st September 2022 (via the Windows Store edition of WSL2) ● This was heavily influenced by my proof, and those of alternative implementations like Genie, that it is viable and in-demand ● Canonical were ready to go their own way for Ubuntu, i.e. my way, if MS didn’t provide it natively – they had an implementation ready to go long before MS announced native support publicly
  • 10. 09/11/2022 Dani Llewellyn 10 My work with WSL2: Snaps ● My main focus for WSL2 was to get Snaps running after Systemd was functional ● Mostly it just worked once Systemd was running ● Snaps ideally need Apparmor in the kernel for “Strict Confinement” support ● Microsoft’s provided kernel does not enable Apparmor as provided ● To enable Apparmor a kernel rebuild is required ● I have automated this rebuild at https://github.com/diddlesnaps/WSL2-Linux-Kernel
  • 11. 09/11/2022 Dani Llewellyn 11 My work with WSL2: Hayden Barnes ● Invited by Hayden to present my work on Snaps on WSL2 at the Mini WSLConf ● Hayden consulted my expertise for input while writing his book: “Pro Windows Subsystem for Linux (WSL): Powerful Tools and Practices for Cross- Platform Development and Collaboration” published by Apress ● I provided insights about interop such as how to use Outlook from WSL2 to send emails by replacing the sendmail command ● Investigated and documented managing WSL2 instances with: ● Canonical’s Landscape ● Microsoft’s InTune ● Ansible ● More besides...
  • 12. 09/11/2022 Dani Llewellyn 12 Current and Future Plans ● Graphical Snap Applications via WSLg with 3D acceleration support ● Needs more support from Snapd – I have an initial PR ● I need to actually test it, re-roll, and improve it – Limited by inability to build the snapd snap until I got my OCI container supporting core builds again recently ● I want to ensure strict confinement works when WSL2 has AppArmor available ● Automated Testing of WSL & WSL2 projects ● Spinning up a matrix of Windows releases ● Testing my project(s) against this matrix ● Disposing of the test machines again ● My VMs are currently broken when hosting Windows 11 22H2 though - investigating ● Super Secret future project that I’m researching now
  • 13. 09/11/2022 Dani Llewellyn 13 Wait, Secret Project?
  • 14. 09/11/2022 Dani Llewellyn 14 The inspiration ● Hayden Barnes posted this video to Twitter last year showing XFCE on Windows login
  • 15. 09/11/2022 Dani Llewellyn 15 Investigations ● I’ve been intensely investigating logind and user sessions ● Thinking about the WSLg setup using a separate system container to host Wayland and Weston ● Maybe we can port the Weston changes to Mutter and other Wayland compositors to support their use on WSLg by their various desktop environments ● We need to know the WSL2 Hyper-V VM identity for Hyper-V Socket establishment by Remote Desktop Connection client ● This ID is currently exposed to the Weston in the system container by an environment variable set up by the Microsoft init process, but we might be able to discover this in the distro container? ● HCS does not expose this metadata easily for query via scripted calls into Windows from WSL2 ● We also need to be able to tell Remote Desktop Connection that desktop windows should be bottom-most in the stack and never overlay Windows app windows or other WSL app windows
  • 16. 09/11/2022 Dani Llewellyn 16 The Plan... ● If this is indeed possible in the long run I plan: ● Automatic start of Linux desktop environment using WSLg-style GUI passthrough to Windows ● Windows’ explorer.exe automatic launch on login will be replaced by an automatic launch of our Linux desktop environment instead ● Windows apps will have shortcuts forwarded to the Linux Desktop Environment’s menu ● This is the reverse to what WSLg currently does in putting the Linux apps in the Windows start menu
  • 17. 09/11/2022 Dani Llewellyn 17 Why? ● Will be mind-blowing if I get it going ● Needs a lot of development time, and even more research ● Will truly make the “Year of the Linux Desktop” naysayers sit up and take notice, if it can be done ● Even if they just ridicule it
  • 18. 09/11/2022 Dani Llewellyn 18 404: Demo not found ● I hoped to have a very rough Proof of Concept but I didn’t have time to get it going… also I left it far to late to even start preparing it 🤦‍♀️
  • 19. 09/11/2022 Dani Llewellyn 19 Acknowledgements ● Hayden Barnes (formally of Pengwin, also formally WSL lead at Canonical; @unixterminal) and Nuno do Carmo (of Rancher Labs at SuSE; @nunixtech) ● For helping me with WSL2 experiments and sharing their knowledge freely ● Heather Ellsworth (Ubuntu Desktop team; @linux_flower) and Monica Madon (former Ubuntu Community Respresentative; @communiteatime) ● For being excellent friends and providing constant encouragement and moral support, especially while I'm trying to find work that is suitable for my talents ● Martin Wimpress (@m_wimpress), Alan Pope (@popey) both alumni of the Snap Advocacy team ● For recognising my capability and enthusiasm for the Snap Packaging world, inviting me to Snapcraft Summits to share my knowledge, and encouraging me to get deeper into the Ubuntu Community
  • 20. 09/11/2022 Dani Llewellyn 20 Where to find me ● WSL Chat on Telegram (set up by Hayden Barnes): https://t.co/TNYoOqS5P7 ● Ubuntu Discourse (diddledani) ● Snapcraft Forum (diddledani) ● https://github.com/diddlesnaps ● https://github.com/diddledani ● https://github.com/UbuntuAccomplishments ● Twitter (@diddledani) ● Mastodon (@diddledani@mastodon.lol) ● Also: I’m currently looking for work 😉