Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Windows Terminal profile #818

Closed
nunix opened this issue Oct 17, 2021 · 6 comments
Closed

[Suggestion] Windows Terminal profile #818

nunix opened this issue Oct 17, 2021 · 6 comments
Labels

Comments

@nunix
Copy link

nunix commented Oct 17, 2021

For bugs, describe what you're seeing
By default, both WSL distros (Rancher Desktop and Rancher Desktop Data) are listed in Windows Terminal due to the automatic scan of WSL distros.
Not sure this is the wanted behavior, however when compared to Docker Desktop, their WSL distros are not listed.

For feature requests, describe what you'd like to add or change
Depending on what wants to be achieved by the Dev team, there could be two options for a better user experience:

  1. Hide/Delete both entries from the Windows Terminal (and Preview) profile (Windows path: %USERPROFILE%\AppData\Local\Packages\Microsoft.WindowsTerminal*\LocalState\settings.json)
  2. Only hide/delete the Rancher Desktop Data WSL distro entry as the user can't/shouldn't work with it and let the Rancher Desktop available (might be helpful for some debugging)

To Reproduce
Steps to reproduce the behaviour:

  1. Have Windows Terminal installed
  2. Have Rancher Desktop installed
  3. Open a new instance of Windows Terminal and click on the profile selector icon

Result
image

Expected behaviour
As stated above, either both or the Rancher Desktop Data should not appear

Screenshots
See above

Setup (please complete the following information):

  • OS: Windows 11
  • Terminal: Windows Terminal and Windows Terminal Preview
  • Rancher Desktop version: 0.6.0
  • Kubernetes version: n/a (or applicable to all)

Thanks a lot for your support.

@mook-as
Copy link
Contributor

mook-as commented Oct 18, 2021

Unfortunately, I believe we have to close this as not possible.

Windows Terminal actually blacklists any WSL distributions with a prefix of docker-desktop:

https://github.com/microsoft/terminal/blob/479ef264b2d9e284db1fc8457f3897d1b19ac32e/src/cascadia/TerminalSettingsModel/WslDistroGenerator.cpp#L130

So this is only possible if they add some hook to let us opt ourselves into being hidden by default.

… That or call it docker-desktop-no-actually-rancher-desktop, but that's silly ;)

@mook-as mook-as closed this as completed Oct 18, 2021
@nunix
Copy link
Author

nunix commented Oct 20, 2021

Thanks a lot for the feedback. It might be a good feature for Windows Terminal then, I will open an issue there.

@zadjii-msft
Copy link

Hey so maybe we should revisit this discussion. The Terminal totally provides a mechanism by which an application developer can customize profiles the Terminal dynamically generates. You should be able to use fragment extensions to set the hidden property using the updates property. These profiles would still show up in the settings UI for the Terminal, but not in the dropdown. That's probably an acceptable tradeoff here.

Other discussion: microsoft/terminal#12757

@mook-as
Copy link
Contributor

mook-as commented Jul 7, 2022

So if I'm understanding things correctly, the profile GUID for our WSL distributions will be based on the distro name (and therefore effectively constant for us), and we can just drop JSON files in the appropriate places and things will apply automatically for us?

If that's the case, that should be doable on our side (even if it takes a while for us to get to it). Thanks!

@mook-as mook-as reopened this Jul 7, 2022
@zadjii-msft
Copy link

the profile GUID for our WSL distributions will be based on the distro name (and therefore effectively constant for us)

Yep! That's the contract that some other distros are already reliant on, so we're not about to change that.

@jandubois
Copy link
Member

The Rancher Desktop distros are no longer listed in Windows Terminal: microsoft/terminal#15166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants