-
My CUI app wants to know where the UI is. That was pretty straightforward in a console, GetWindowRect(GetConsoleWindow(), ...). Are there any suggestions for doing it when the host is Windows Terminal? |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
No, this is not (and will not be) supported. The remoting infrastructure Terminal is built on also supports SSH and other windowless use cases (like pty hosting for tmux, screen, etc.). It is also unsuitable for tabbed or paned presentation: what is the window rect of a console hosted in a tab that is not currently visible? Can it be said to have a window? |
Beta Was this translation helpful? Give feedback.
-
Any heuristic we could suggest would be subject to the same limitation 😄 |
Beta Was this translation helpful? Give feedback.
-
Any heuristic we could suggest would be subject to the same limitation Fine, suggest something. |
Beta Was this translation helpful? Give feedback.
-
Set the window title and then look it up by title. It’ll only tell you where the window containing the pane is, only when it’s active, and only on the same machine. If that’s fine-grained enough, that should work. |
Beta Was this translation helpful? Give feedback.
-
Done that. It's fairly easy but has it's problems, as you noted. If my app is the shell (i.e., was started by windowsterminal.exe) I can EnumWindows looking for the "CASCADIA_HOSTING_WINDOW_CLASS" window whose ProcessId matches that of my parent. That's more heavy-handed and also not perfect. |
Beta Was this translation helpful? Give feedback.
-
I'd like to see WindowsTerminal in action doing something other than hosting my local command interpreters. If I turn on my Win7-32bit machine, it will be networked. Is there some server software for Win7/32 and client software for Win10/64 that will let me mess around with (say) SSH? |
Beta Was this translation helpful? Give feedback.
-
Yeah! Win32-OpenSSH ships a server that works down to Windows 7, and the client ships in-box on Windows 10. |
Beta Was this translation helpful? Give feedback.
-
Thanks. Yup. I was just fetching OpenSSH-Win32.zip and I found some install help. What's the client (Win10) and how do I do it all with WindowsTerminal? |
Beta Was this translation helpful? Give feedback.
-
The client that ships with Windows is You can set up a profile whose |
Beta Was this translation helpful? Give feedback.
-
That was easy enough. So I've seen it work. This (below), however, failed on the Win7 machine. Any ideas? G:\OpenSSH> .\ssh-keygen.exe -A That said, I do have these: 2020-09-06 16:35 6 sshd.pid That said, I am asked for a password. ... ????? |
Beta Was this translation helpful? Give feedback.
No, this is not (and will not be) supported. The remoting infrastructure Terminal is built on also supports SSH and other windowless use cases (like pty hosting for tmux, screen, etc.).
It is also unsuitable for tabbed or paned presentation: what is the window rect of a console hosted in a tab that is not currently visible? Can it be said to have a window?