terminal 只可以附加控制台应用吗? #16814

Closed
opened 2026-01-31 05:23:51 +00:00 by claunia · 8 comments
Owner

Originally created by @a48625a on GitHub (Feb 18, 2022).

terminal 只可以附加像cmd、power shell之类的控制台应用吗?
能不能附加c#的窗口应用?如果不能,以后有没有可能支持这一功能。

Originally created by @a48625a on GitHub (Feb 18, 2022). terminal 只可以附加像cmd、power shell之类的控制台应用吗? 能不能附加c#的窗口应用?如果不能,以后有没有可能支持这一功能。
Author
Owner

@zadjii-msft commented on GitHub (Feb 18, 2022):

Apologies, I'm trying to use a machine translation. Sorry if I misunderstand.

You mean like, launch the Windows Terminal automatically when you launch cmd or powershell directly? That's actually a feature that we've already shipped in Windows 11. The "default terminal" setting changes which application is used to hsot commandline applications by default.

For more info see: Windows Terminal as your Default Command Line Experience.

Is that what you meant?

@zadjii-msft commented on GitHub (Feb 18, 2022): Apologies, I'm trying to use a machine translation. Sorry if I misunderstand. You mean like, launch the Windows Terminal automatically when you launch `cmd` or `powershell` directly? That's actually a feature that we've already shipped in Windows 11. The "default terminal" setting changes which application is used to hsot commandline applications by default. For more info see: [Windows Terminal as your Default Command Line Experience](https://devblogs.microsoft.com/commandline/windows-terminal-as-your-default-command-line-experience/#:~:text=What%20is%20a%20default%20terminal,Console%20Host%2C%20conhost.exe). Is that what you meant?
Author
Owner

@Hill-98 commented on GitHub (Feb 18, 2022):

如果你需要将第三方程序添加进 terminal,只需要第三方程序是标准的可交互命令行即可。

如果你需要在自己的应用程序中使用 terminal,比如使用 terminal 的渲染引擎等组件,你需要自己进行集成。


If you need to add a third-party program to terminal, you only need the third-party program to be a standard interactable command line.

If you need to use terminal in your own application, for example using components such as terminal's rendering engine, you will need to do your own integration.

@Hill-98 commented on GitHub (Feb 18, 2022): 如果你需要将第三方程序添加进 terminal,只需要第三方程序是标准的可交互命令行即可。 如果你需要在自己的应用程序中使用 terminal,比如使用 terminal 的渲染引擎等组件,你需要自己进行集成。 ------ If you need to add a third-party program to terminal, you only need the third-party program to be a standard interactable command line. If you need to use terminal in your own application, for example using components such as terminal's rendering engine, you will need to do your own integration.
Author
Owner

@Hill-98 commented on GitHub (Feb 18, 2022):

I can't translate this issue accurately into English because I don't understand his full meaning either, I can only try to guess.

@Hill-98 commented on GitHub (Feb 18, 2022): I can't translate this issue accurately into English because I don't understand his full meaning either, I can only try to guess.
Author
Owner

@a48625a commented on GitHub (Feb 20, 2022):

I mean: can terminal attach window programs like cmd.exe. For example: wpf program, notepad.exe, etc.

@a48625a commented on GitHub (Feb 20, 2022): I mean: can terminal attach window programs like cmd.exe. For example: wpf program, notepad.exe, etc.
Author
Owner

@Hill-98 commented on GitHub (Feb 20, 2022):

终端是用于提供和 Shell 交互的图形界面,并不是”附加“,所以不能用于图形程序。


The terminal is used to provide a graphical interface for interacting with the shell, not "attach", so it cannot be used for GUI.

@Hill-98 commented on GitHub (Feb 20, 2022): 终端是用于提供和 Shell 交互的图形界面,并不是”附加“,所以不能用于图形程序。 ------- The terminal is used to provide a graphical interface for interacting with the shell, not "attach", so it cannot be used for GUI.
Author
Owner

@a48625a commented on GitHub (Feb 20, 2022):

thank you!

@a48625a commented on GitHub (Feb 20, 2022): thank you!
Author
Owner

@driver1998 commented on GitHub (Feb 22, 2022):

Might be related to https://github.com/microsoft/terminal/issues/997. But hosting a UIElement like a WebView is one thing, hosting a different GUI application (basically means hosting another HWND window) is another.

My translation of the issue:
Can Terminal attach or host something other than console apps? Like GUI apps in C# for example.

@driver1998 commented on GitHub (Feb 22, 2022): Might be related to https://github.com/microsoft/terminal/issues/997. But hosting a UIElement like a WebView is one thing, hosting a different GUI application (basically means hosting another HWND window) is another. My translation of the issue: Can Terminal attach or host something other than console apps? Like GUI apps in C# for example.
Author
Owner

@zadjii-msft commented on GitHub (Feb 22, 2022):

My other theory is that OP means something like #4572/#6999. Either that or #11387. Sounds like the question was answered though, thanks for the assist @Hill-98 ☺️

@zadjii-msft commented on GitHub (Feb 22, 2022): My other theory is that OP means something like #4572/#6999. Either that or #11387. Sounds like the question was answered though, thanks for the assist @Hill-98 ☺️
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16814