mkevenaar / chocolatey-packages

My chocolatey packages
https://mkevenaar.github.io/chocolatey-packages/
Apache License 2.0
42 stars 70 forks source link

Windows Terminal does not launch on Server 2022 #227

Open asheroto opened 9 months ago

asheroto commented 9 months ago

Expected Behavior

Expected Windows Terminal to work on Server 2022

Current Behavior

On Server 2022, installing with choco install microsoft-windows-terminal succeeds to install, but winget is not able to run. Launching wt.exe does nothing (no error), same behavior when launching from the Start Menu. Running from WindowsTerminal.exe and wt.exe from C:\Program Files\WindowsApps\<terminal folder> does not work and gives an error (not supposed to launch this way, most apps give error like this).

Windows 11 works fine. Let me first say that, I understand that Server 2022 is not officially supported, so I understand if the maintainer is not willing to adjust the setup.

Possible Solution

You can install Windows Terminal through winget and it works great, and is able to launch successfully.

The first thought would be to install winget through Chocolatey, but winget-cli won't let you install if you're running Server 2022, but you can instead install winget manually or use winget-install which will install it.

winget-install is a script I've been developing that detects which version of the OS you're running, chooses a prerequisite based on that, then installs winget. More info in the Script Functionality section of the README. This seems to be the most reliable way to install winget itself on Windows 10/11 and Server 2022.

If you want a more direct approach, you could use some of the logic inside the winget-install.ps1 script to install the prerequisites so that Windows Terminal will work.

This post provides some commands claiming to make Terminal work on Server 2022, but I tested several times and Windows Terminal would still not launch.

Steps to Reproduce (for bugs)

  1. Install a fresh copy of Server 2022
  2. Install Chocolatey
  3. Run choco install microsoft-windows-terminal

Setup will complete successfully, but Terminal will not run.

Context

see below

Your Environment


Demo installing with Choco package

Here is a blank Server 2022 VM to help illustrate the issue. The only thing installed is Chocolatey. Restarting the computer still does not let Windows Terminal launch either.

https://github.com/mkevenaar/chocolatey-packages/assets/49938263/06ac24da-ff9a-4ae1-b77c-df272439051a

Demo installing with winget

Reverted back to the checkpoint before I started, installed Chocolatey, then installed with winget, and it works fine.

https://github.com/mkevenaar/chocolatey-packages/assets/49938263/4be4db30-a221-4f07-b455-edc8ece922c7

The only thing not working is the Cascadia Mono font (open source) is missing, but of course that can be added.

Other thoughts

I will likely create a separate script that will install winget and then install Windows Terminal, so if you're interested in just referencing that script that could be a possible solution as well. Just trying to brainstorm! Part of the script will be to download and install the Cascadia Mono font.