Don't generate WSL distributions for Rancher Desktop #17078

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

Originally created by @AlexHunterCodes on GitHub (Mar 25, 2022).

Description of the new feature/enhancement

Feature request #3556 suggested blocking Terminal from auto-generating profiles for Docker Desktop's service WSL2 machines, and this was accepted and implemented.

Rancher Desktop is a new alternative to Docker for Windows developed by Rancher/SUSE and optimised for containerd and Kubernetes; and it uses a similar WSL2-based backend with two managed service machines: rancher-desktop and rancher-desktop-data. This leads to Terminal auto-generating profiles for these machines, even if there is no practical reason to ever use them.

A workaround for this is to hide the two entries from the profile list with the Settings GUI or in settings.json:

{
    "guid": "{1cd79813-5972-56cb-badb-ba5ee12693c5}",
    "hidden": true,
    "name": "rancher-desktop",
    "source": "Windows.Terminal.Wsl"
},
{
    "guid": "{1bdae7ec-8ca6-5caa-8453-8b6fe78b2748}",
    "hidden": true,
    "name": "rancher-desktop-data",
    "source": "Windows.Terminal.Wsl"
},

Terminal should extend this blocking feature to include Rancher Desktop's service machines too, with the likelihood of future apps bundling more WSL service machines in mind.

Proposed technical implementation details (optional)

This could be achieved in a few different ways:

  1. The quick fix, add more hard-coded rules to extend the code added in #4156, and hope that loads more apps don't start shipping bundled WSL distros.
  2. Suggestion from #3556, use metadata to differentiate service machines from user machines during auto-generation. This should probably include an allowlist config option to override this automatic detection when necessary. I'm not sure how feasible this is, as I don't think there's any suitable existing metadata provided by WSL. Maybe the distributions themselves would have to provide some flag for Terminal to detect?
  3. Provide a blocklist config option, which would allow:
    • Apps providing WSL distros to programmatically insert their service machine's names into settings.json during app installation
    • Users to manually specify machines to skip, which also allows service machine developers (like me) greater flexibility in general.

Main benefit of options 2 and 3 is eliminating the burden on the Terminal team of maintaining a hard-coded blocklist, and dealing with further requests like these in future. I could see both 2 and 3 in combination being the ideal solution in the long term.

Originally created by @AlexHunterCodes on GitHub (Mar 25, 2022). # Description of the new feature/enhancement Feature request #3556 suggested blocking Terminal from auto-generating profiles for Docker Desktop's service WSL2 machines, and this was accepted and implemented. [Rancher Desktop](https://github.com/rancher-sandbox/rancher-desktop) is a new alternative to Docker for Windows developed by Rancher/SUSE and optimised for containerd and Kubernetes; and it uses a similar WSL2-based backend with two managed service machines: `rancher-desktop` and `rancher-desktop-data`. This leads to Terminal auto-generating profiles for these machines, even if there is no practical reason to ever use them. A workaround for this is to hide the two entries from the profile list with the Settings GUI or in settings.json: ```javascript { "guid": "{1cd79813-5972-56cb-badb-ba5ee12693c5}", "hidden": true, "name": "rancher-desktop", "source": "Windows.Terminal.Wsl" }, { "guid": "{1bdae7ec-8ca6-5caa-8453-8b6fe78b2748}", "hidden": true, "name": "rancher-desktop-data", "source": "Windows.Terminal.Wsl" }, ``` Terminal should extend this blocking feature to include Rancher Desktop's service machines too, with the likelihood of future apps bundling more WSL service machines in mind. # Proposed technical implementation details (optional) This could be achieved in a few different ways: 1. The quick fix, add more hard-coded rules to extend the code added in #4156, and hope that loads more apps don't start shipping bundled WSL distros. 2. Suggestion from #3556, use metadata to differentiate service machines from user machines during auto-generation. This should probably include an allowlist config option to override this automatic detection when necessary. I'm not sure how feasible this is, as I don't think there's any suitable existing metadata provided by WSL. Maybe the distributions themselves would have to provide some flag for Terminal to detect? 3. Provide a blocklist config option, which would allow: - Apps providing WSL distros to programmatically insert their service machine's names into `settings.json` during app installation - Users to manually specify machines to skip, which also allows service machine developers (like me) greater flexibility in general. Main benefit of options 2 and 3 is eliminating the burden on the Terminal team of maintaining a hard-coded blocklist, and dealing with further requests like these in future. I could see both 2 and 3 in combination being the ideal solution in the long term.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17078