The in and outs of Microsoft's new Windows Terminal

Handy features in the Store applications, but the underlying infrastructure changes matter more


Hands On Microsoft's new terminal app is now available in the Windows Store - so naturally your vultures took it for a spin.

What's the point of the new Windows terminal? There are a few things. One obvious one is multi-tab support. You can click + to add a tab. There is also a drop-down menu that lets you select which command line application - such as cmd, PowerShell, a Windows Subsystem for Linux distribution – you would like to use.

Each of these drop-downs is a "profile" and you can configure the profile, or add new ones, by editing the file profiles.json, which lives in your AppData\Local folder.

The new Terminal in the Microsoft Store

The new Terminal in the Microsoft Store

The new Windows Terminal is a UWP (Universal Windows Platform) application, as evidenced by the ugliness of the tab bar and the over-sized plus symbol. If you download the newly open-sourced Terminal code from GitHub you will find several sections included (each containing multiple projects). Windows Terminal is the Store app codenamed "Cascadia", but there is also Conhost, which currently builds as OpenConsole.Exe, a Win32 / Win64 (or ARM64) application.

Windows Terminal has tab support and background image options, but there are also changes in OpenConsole.exe versus what you get if you run cmd today. Currently Windows Terminal installs its own copy of OpenConsole.exe, renaming it to the traditional conhost.exe.

Windows Terminal

The Windows Terminal turns up in the Microsoft Store

READ MORE

Microsoft's efforts with the Windows command line are partly to do with usability, and partly to do with compatibility with Unix-like operating systems, especially Linux. Historically, Windows command-line applications have worked though a ConHost API. When an application like Cmd or PowerShell starts up, it gets connected to an instance of ConHost.

This has caused a number of issues for third-party console applications like OpenSSH (Secure Shell) as well as for Microsoft's own Windows Subsystem for Linux. Some applications have been forced to open a command prompt off-screen and scrape its contents in order to work.

Unix-like operating systems use a Pseudo Terminal (PTY) which sends and receives text. This works fine for both local and remote terminal applications. Windows has been moving towards the Unix/Linux model, introducing a Windows Pseudo Console called ConPTY which sends and receives text as an alternative to the old API. This was introduced in the 1809 (October 2018 update) of Windows 10.

A related feature is the gradual introduction of support for VT (Video Terminal) escape sequences, based on an ancient system for formatting text by including codes prefixed with the Esc character. Again this is the Unix-like way to do things versus the Windows Console API. Microsoft is embracing this, hence Program Manager Richard Turner's appeal in December 2018: "start writing (or update existing) Command-Line apps to emit VT enriched text, rather than calling Win32 Console APIs to control/format Console output."

The VT approach now has superior features including 24-bit colour support and a proper concept of foreground and background. This is why the latest Insider Build of Windows 10 includes a "Terminal" tab in Command Prompt properties.

In the new command line infrastructure, Microsoft puts ConHost's ConPTY between new console applications like Windows Terminal and the old Windows Console API, enabling both approaches to work.

The new command line infrastructure in Windows 10

The new command line infrastructure in Windows 10

These changes are more significant than the new Windows Terminal application, even though less visible to most users.

You do not need to run Windows Terminal to get features like Ctrl-Scroll to enlarge or reduce the font size: this works in cmd as well.

A vulture's view

So how is the prototype Windows Terminal now available in the Microsoft Store? It is described as an "early preview" and some features are missing, particularly in the areas of support for assistive technology, which should come in the next update.

The best thing about it is the profile support. Hit Settings in the menu, and profiles.json opens in Visual Studio Code; a crude approach if you are used to the Windows GUI, but effective; perhaps it will stay this way. Make modifications and save, and Windows Terminal instantly updates. This works. Alternatively, if you left out a comma or otherwise broke the JSON, a "Failed to reload settings" message appears.

The profiles let you define specific command lines. For example, you could set up a Visual Studio Developer Command Prompt here, or run a batch file set up for a particular version of Java. You can also configure shortcut keys for commands like New Tab, or New Tab with Profile n, or Switch to Tab n, or to use custom key combinations for text navigation.

Windows Terminal now uses GPU-based text rendering (DirectWrite and DirectX), which means high quality fonts as well as emoji and so on if you want them.

The main reservation is that a desktop version of Windows Terminal, rather than one built using UWP, would probably be even better. Perhaps that would be a step too far for Microsoft, which is willing to do whatever it takes to support Linux, but not yet ready to admit to the difficulties facing UWP. ®

Similar topics

Broader topics


Other stories you might like

  • Start using Modern Auth now for Exchange Online
    Before Microsoft shutters basic logins in a few months

    The US government is pushing federal agencies and private corporations to adopt the Modern Authentication method in Exchange Online before Microsoft starts shutting down Basic Authentication from the first day of October.

    In an advisory [PDF] this week, Uncle Sam's Cybersecurity and Infrastructure Security Agency (CISA) noted that while federal executive civilian branch (FCEB) agencies – which includes such organizations as the Federal Communications Commission, Federal Trade Commission, and such departments as Homeland Security, Justice, Treasury, and State – are required to make the change, all organizations should make the switch from Basic Authentication.

    "Federal agencies should determine their use of Basic Auth and migrate users and applications to Modern Auth," CISA wrote. "After completing the migration to Modern Auth, agencies should block Basic Auth."

    Continue reading
  • Microsoft gives its partners power to change AD privileges on customer systems – without permission
    Somewhat counterintuitively, this is being done to improve security

    Microsoft has created a window of time in which its partners can – without permission – create new roles for themselves in customers' Active Directory implementations.

    Which sounds bonkers, so let's explain why Microsoft has even entertained the prospect.

    To begin, remember that criminals have figured out that attacking IT service providers offers a great way to find many other targets. Evidence of that approach can be found in attacks on ConnectWise, SolarWinds, Kaseya and other vendors that provide software to IT service providers.

    Continue reading
  • FabricScape: Microsoft warns of vuln in Service Fabric
    Not trying to spin this as a Linux security hole, surely?

    Microsoft is flagging up a security hole in its Service Fabric technology when using containerized Linux workloads, and urged customers to upgrade their clusters to the most recent release.

    The flaw is tracked as CVE-2022-30137, an elevation-of-privilege vulnerability in Microsoft's Service Fabric. An attacker would need read/write access to the cluster as well as the ability to execute code within a Linux container granted access to the Service Fabric runtime in order to wreak havoc.

    Through a compromised container, for instance, a miscreant could gain control of the resource's host Service Fabric node and potentially the entire cluster.

    Continue reading

Biting the hand that feeds IT © 1998–2022