Public bug reported:

[Context]
wsl-setup is a package to carry pieces of configuration specifically 
implemented for a better experience with Ubuntu WSL.

A bug reported originally by Microsoft engineers, made public via 
https://github.com/ubuntu/WSL/issues/468, **prevents any GUI application 
relying on Wayland to start**.
The issue happens when cloud-init creates a default user ahead of the user's 
request, which can happen whenever users don't supply any user-data.
WSL graphical subsystem (WSLg) expects the default user to be UID 1000, which, 
being taken by cloud-init, causes the subsystem to mess with runtime dir 
permissions.
The fix was implemented in https://github.com/ubuntu/wsl-setup/pull/12 and made 
available in wsl-setup v0.5.3, by adding a configuration override to prevent 
cloud-init from creating the default "ubuntu" user.

[Impact]
* Only WSL users creating new instances of Ubuntu 24.04 LTS are subject to 
cloud-init effects.
* Currently users affected by this bug are considered early-adopters. A much 
wider audience is expected with the release of 24.04.1.
* wsl-setup is exclusive to Ubuntu WSL, so no other Ubuntu product or 
experience is affected.

[Test plan]
* Install the most recent version of Ubuntu 24.04 LTS application from MS Store 
with the latest wsl-setup already seeded.
* Start the application on a Windows console: `ubuntu2404.exe`.
* When prompted create the default user and password via the regular WSL 
launcher workflow.
* When the setup is complete and bash is shown install the `gtk-4-examples` 
package with: `sudo apt update && sudo apt install -y gtk-4-examples`.
* When installation is complete, run the gtk4-demo application with the default 
backend and ensure it opens correctly: `gtk4-demo`.
* Close it and relaunch it with the GDK backend set to "wayland": 
`GDK_BACKEND=wayland gtk4-demo`. Assert that the application opens as before.

[Where problems could occur]
* Users familiar with cloud-init on Ubuntu might expect the creation of the 
`ubuntu` user, as it happens with clouds and LXD containers.

[Other Info]
* Cloud-init support on WSL is recent enough so users should not have had 
enough time to create expectations about such behavior by the time this SRU is 
finished.
* A similar test workflow was proposed to ISO Tracker test case for Ubuntu WSL 
to check that behavior.  Merge proposal: 
https://code.launchpad.net/~cnihelton/ubuntu-manual-tests/+git/ubuntu-manual-tests/+merge/465894

** Affects: wsl-setup (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

- wsl-setup is a package to carry pieces of confuguration specifically
- implemented for a better experience with Ubuntu WSL.
+ [Context]
+ wsl-setup is a package to carry pieces of configuration specifically 
implemented for a better experience with Ubuntu WSL.
  
- A bug reported originally by Microsoft engineers, made public via
- https://github.com/ubuntu/WSL/issues/468, prevents any GUI application
- relying on Wayland to start. The fix was implemented in
- https://github.com/ubuntu/wsl-setup/pull/12 and made available in wsl-
- setup v0.5.3, by adding a configuration override to prevent cloud-init
- from creating the default "ubuntu" user, which confused the WSL
- graphical subsystem (WSLg).
+ A bug reported originally by Microsoft engineers, made public via 
https://github.com/ubuntu/WSL/issues/468, **prevents any GUI application 
relying on Wayland to start**.
+ The issue happens when cloud-init creates a default user ahead of the user's 
request, which can happen whenever users don't supply any user-data.
+ WSL graphical subsystem (WSLg) expects the default user to be UID 1000, 
which, being taken by cloud-init, causes the subsystem to mess with runtime dir 
permissions.
+ The fix was implemented in https://github.com/ubuntu/wsl-setup/pull/12 and 
made available in wsl-setup v0.5.3, by adding a configuration override to 
prevent cloud-init from creating the default "ubuntu" user.
  
  [Impact]
  * Only WSL users creating new instances of Ubuntu 24.04 LTS are subject to 
cloud-init effects.
  * Currently users affected by this bug are considered early-adopters. A much 
wider audience is expected with the release of 24.04.1.
  * wsl-setup is exclusive to Ubuntu WSL, so no other Ubuntu product or 
experience is affected.
  
  [Test plan]
  * Install the most recent version of Ubuntu 24.04 LTS application from MS 
Store with the latest wsl-setup already seeded.
  * Start the application on a Windows console: `ubuntu2404.exe`.
  * When prompted create the default user and password via the regular WSL 
launcher workflow.
  * When the setup is complete and bash is shown install the `gtk-4-examples` 
package with: `sudo apt update && sudo apt install -y gtk-4-examples`.
  * When installation is complete, run the gtk4-demo application with the 
default backend and ensure it opens correctly: `gtk4-demo`.
- * Close it and relaunch it with the GDK backend set to wayland: 
`GDK_BACKEND=wayland gtk4-demo`. Assert that the application opens as before.
- 
- ---
- A similar workflow was also added to ISO Tracker for Ubuntu WSL to check that 
behavior.
+ * Close it and relaunch it with the GDK backend set to "wayland": 
`GDK_BACKEND=wayland gtk4-demo`. Assert that the application opens as before.
  
  [Where problems could occur]
  * Users familiar with cloud-init on Ubuntu might expect the creation of the 
`ubuntu` user, as it happens with clouds and LXD containers.
  
  [Other Info]
  * Cloud-init support on WSL is recent enough so users should not have had 
enough time to create expectations about such behavior by the time this SRU is 
finished.
+ * A similar workflow was also proposed to ISO Tracker test case for Ubuntu 
WSL to check that behavior.
+  Merge proposal: 
https://code.launchpad.net/~cnihelton/ubuntu-manual-tests/+git/ubuntu-manual-tests/+merge/465894

** Description changed:

  [Context]
  wsl-setup is a package to carry pieces of configuration specifically 
implemented for a better experience with Ubuntu WSL.
  
  A bug reported originally by Microsoft engineers, made public via 
https://github.com/ubuntu/WSL/issues/468, **prevents any GUI application 
relying on Wayland to start**.
  The issue happens when cloud-init creates a default user ahead of the user's 
request, which can happen whenever users don't supply any user-data.
  WSL graphical subsystem (WSLg) expects the default user to be UID 1000, 
which, being taken by cloud-init, causes the subsystem to mess with runtime dir 
permissions.
  The fix was implemented in https://github.com/ubuntu/wsl-setup/pull/12 and 
made available in wsl-setup v0.5.3, by adding a configuration override to 
prevent cloud-init from creating the default "ubuntu" user.
  
  [Impact]
  * Only WSL users creating new instances of Ubuntu 24.04 LTS are subject to 
cloud-init effects.
  * Currently users affected by this bug are considered early-adopters. A much 
wider audience is expected with the release of 24.04.1.
  * wsl-setup is exclusive to Ubuntu WSL, so no other Ubuntu product or 
experience is affected.
  
  [Test plan]
  * Install the most recent version of Ubuntu 24.04 LTS application from MS 
Store with the latest wsl-setup already seeded.
  * Start the application on a Windows console: `ubuntu2404.exe`.
  * When prompted create the default user and password via the regular WSL 
launcher workflow.
  * When the setup is complete and bash is shown install the `gtk-4-examples` 
package with: `sudo apt update && sudo apt install -y gtk-4-examples`.
  * When installation is complete, run the gtk4-demo application with the 
default backend and ensure it opens correctly: `gtk4-demo`.
  * Close it and relaunch it with the GDK backend set to "wayland": 
`GDK_BACKEND=wayland gtk4-demo`. Assert that the application opens as before.
  
  [Where problems could occur]
  * Users familiar with cloud-init on Ubuntu might expect the creation of the 
`ubuntu` user, as it happens with clouds and LXD containers.
  
  [Other Info]
  * Cloud-init support on WSL is recent enough so users should not have had 
enough time to create expectations about such behavior by the time this SRU is 
finished.
- * A similar workflow was also proposed to ISO Tracker test case for Ubuntu 
WSL to check that behavior.
-  Merge proposal: 
https://code.launchpad.net/~cnihelton/ubuntu-manual-tests/+git/ubuntu-manual-tests/+merge/465894
+ * A similar test workflow was proposed to ISO Tracker test case for Ubuntu 
WSL to check that behavior.  Merge proposal: 
https://code.launchpad.net/~cnihelton/ubuntu-manual-tests/+git/ubuntu-manual-tests/+merge/465894

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2065349

Title:
  [SRU] Default user created by cloud-init confuses WSLg

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wsl-setup/+bug/2065349/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to