4 ms·
Trivia time! The windows console host (conhost) provides the “UI” for nano server. Even on desktop Windows, it’s built with support for running without a windo
by DHowett 5y ago
Trivia time!
The windows console host (conhost) provides the “UI” for nano server. Even on desktop Windows, it’s built with support for running without a window manager. The rendering engine is named “wddmcon” and it lives in our repository at [1]; it’s pretty much the most barebones console renderer we have. Reverse video and most color support were obviously[2] never implemented… even though I would have liked to spend engineering effort on it. The decision predates me, but I suspect it’s because they weren’t necessary for local validation.
Wddmcon eventually evolved into the rendering engine used in Windows Terminal[3]; it’s still not very good[4], but it works in conhost as well. Eventually, we can bring those changes or whatever future rendering engine we write back to wddmcon.
It has a sister renderer, “bgfxcon”. Bgfxcon renders text to the blue screen/boot graphics driver in the event that WDDM is unavailable.
If you manage to open multiple (full-screen) console sessions, you can flip between them using Alt-Tab. This service is provided by the “console I/O server”, a CSRSS component available only on Nano Server that mimics some of the user32 things conhost needs, such as keyboard input. It also handles brokering us a WDDM or BGFX handle on startup. Unfortunately, that one’s closed-source… not because it should be, but because disentangling the build process for a component that lives in CSRSS wasn’t on our critical path.
[1]: https://github.com/microsoft/terminal/tree/main/src/renderer/wddmcon https://github.com/microsoft/terminal/tree/main/src/renderer...
[2]: which the article has already called out!
[3]: https://github.com/microsoft/terminal/tree/main/src/renderer/dx https://github.com/microsoft/terminal/tree/main/src/renderer...
[4]: https://github.com/microsoft/terminal/issues/10362 https://github.com/microsoft/terminal/issues/10362
- DHowett 5y agoAh! I've been informed that the console host and renderer that support Nano Server (10.0.14393 or so) are quite unlike the version I'm familiar with. Nano Server uses bgfxcon exclusively, as well as some magic in a "console keyboard driver" that I didn't know we had.