Re-registered WSL distro profiles do not get auto generated on terminal restart unless state.json is deleted. #15549

Open
opened 2026-01-31 04:41:38 +00:00 by claunia · 0 comments
Owner

Originally created by @ghost on GitHub (Oct 14, 2021).

Windows Terminal version (or Windows build number)

Microsoft Windows [Version 10.0.19043.1237]

Other Software

WSL

Steps to reproduce

  • close terminal
  • re-register an existing WSL distribution which had an existing profile in WT before
  • remove that profile from WT's config
  • open terminal
  • config file does NOT contain the new distribution's auto-generated profile

Expected Behavior

An auto-generated profile for the WSL distro which was registered.

Actual Behavior

A profile is not added automatically, to make WT add the profile, the state.json file must be deleted, and the terminal must be reopened.

I'm just blindly guessing but I'm assuming this bug as to do w caching existing profiles in state.json, wt looks at the guid in state.json, assumes thats already generated, and skips trying to generate it again for the config.

Also, just for my own curiosity, how are the GUIDs generated for a distro? Is it a uuid v5 with the terminal uuid namespace? I registered a custom distro using wsl --import and it gave it a GUID too. A uuid v5 is what i could tell from the source code, but i tried generating some UUID v5s myself using the terminal's runtime namespace and the name of the distro, and the results weren't the same.

Originally created by @ghost on GitHub (Oct 14, 2021). ### Windows Terminal version (or Windows build number) Microsoft Windows [Version 10.0.19043.1237] ### Other Software WSL ### Steps to reproduce - close terminal - re-register an existing WSL distribution which had an existing profile in WT before - remove that profile from WT's config - open terminal - config file does NOT contain the new distribution's auto-generated profile ### Expected Behavior An auto-generated profile for the WSL distro which was registered. ### Actual Behavior A profile is not added automatically, to make WT add the profile, the state.json file must be deleted, and the terminal must be reopened. I'm just blindly guessing but I'm assuming this bug as to do w caching existing profiles in state.json, wt looks at the guid in state.json, assumes thats already generated, and skips trying to generate it again for the config. Also, just for my own curiosity, how are the GUIDs generated for a distro? Is it a uuid v5 with the terminal uuid namespace? I registered a custom distro using `wsl --import` and it gave it a GUID too. A uuid v5 is what i could tell from the source code, but i tried generating some UUID v5s myself using the terminal's runtime namespace and the name of the distro, and the results weren't the same.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15549