Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How does "Default Terminal" work? #15853

Closed
tang-nn opened this issue Aug 20, 2023 · 8 comments
Closed

How does "Default Terminal" work? #15853

tang-nn opened this issue Aug 20, 2023 · 8 comments
Labels
Area-DefApp Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered

Comments

@tang-nn
Copy link

tang-nn commented Aug 20, 2023

Why do I directly double-click the cmd.exe file in the System32 directory, it will also open in Windows Terminal? How is it achieved? Ask for answers

@tang-nn tang-nn added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 20, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 20, 2023
@237dmitry
Copy link

237dmitry commented Aug 20, 2023

What is your default terminal application? Check settings of Windows Terminal or conhost.exe. In my settings "Let Windows decide"

Win+R > conhost

Screenshot 2023-08-20 183602

@tang-nn
Copy link
Author

tang-nn commented Aug 21, 2023

I want to know how it works

@237dmitry
Copy link

237dmitry commented Aug 21, 2023

I want to know how it works

Change the default terminal applications and check values in the HKCU\Console\%%Startup registry key.

Can be read here

@tang-nn
Copy link
Author

tang-nn commented Aug 21, 2023

I deleted the registry key HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe,
Also opens in Terminal

@tang-nn
Copy link
Author

tang-nn commented Aug 21, 2023

It should be a bug when my cmd is opened in Terminal

@237dmitry
Copy link

I deleted the registry key HKEY_CURRENT_USER\Console%SystemRoot%_system32_cmd.exe

You deleted console host settings for Windows\System32\cmd.exe (color, size, font etc) This out of subject.

It should be a bug when my cmd is opened in Terminal

In my environment all works as expected (win 11 22H2).

  • set default terminal application
  • relogin (maybe no need to do)

@tang-nn
Copy link
Author

tang-nn commented Aug 21, 2023

image
image
image

@zadjii-msft
Copy link
Member

What you're seeing is the "Default Terminal" feature in Windows 11, which lets you change which application is used as the default terminal emulator for command-line applications. That was previously always "conhost.exe", but now the Windows Terminal can be used as the default emulator too.

How it works is... complicated... and I believe we're tracking writing those docs in #9462. It was originally spec'd here: #7414

The other comment you have in this thread, about the leading spaces, looks like it's the same thing we're discussing with you in #15836, so I'm gonna collapse that as off-topic.

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered Area-DefApp and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Aug 21, 2023
@DHowett DHowett changed the title Confuse? How does "Default Terminal" work? Aug 21, 2023
@microsoft microsoft locked and limited conversation to collaborators Aug 21, 2023
@DHowett DHowett converted this issue into discussion #15861 Aug 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Area-DefApp Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants