Terminal: Colors not applied correctly

Created on 29 Aug 2017  路  4Comments  路  Source: microsoft/terminal

Starting the cmd with two different ways gives Cmd Prompt in two different color variants.

Image 1:
image

Image 2:
image

I have applied color scheme with colortool -b color-theme-name and also opened Properties sheet and hit Ok as mentioned in the colortool -h. This is supposed to apply the chosen color scheme to both: current and default consoles, but surprisingly I get two different results.

The Image 1 console retains the specified color scheme while the Image 2 console displays the default legacy color scheme.

I get Image 1 color scheme when starting the console using:

  1. Start + R > cmd
  2. Start + X > Command Prompt (Admin)
  3. Shift + Right click > Open command window here in explorer window
  4. Alt + D and typing %comspec% in explorer window

and get the Image 2 color scheme using:

  1. Start menu > cmd, Start + S > cmd and Start + Q > cmd
  2. Start + X > Command Prompt

This is somewhat inconsistent behavior; so please improve it.

This tool is the first awesome tool we Windows CMD lovers got in a while thus we believe that it should be perfect which will eventually _make command prompt great again!!_

Product-Conhost Resolution-By-Design

Most helpful comment

I use this project - concfg clear will get rid of per-shortcut and per-console registry settings so that everything uses the default. You may have to run it separately on shortcuts it doesn't know about though.

All 4 comments

Ah, see, now you're getting into the dirty business of the fact that shortcuts store their own properties separately from the registry. The properties from image 1 and 2 are coming from actually a few places.

First off, the console will load from the defaults first, then either the registry or the shortcut that was launched. When saving with the "Properties" dialog, it will persist back to the registry or the shortcut, but not the defaults.

To break down each one:
__Image 1.1__: This loads and saves the properties from the registry for cmd.exe.

__Image 1.2__: This loads and saves the properties from the Win+X menu's "Command Prompt (Admin)" shortcut.

__Image 1.3__: (I believe) This loads and saves the properties from the registry for cmd.exe.

__Image 1.4__: (I believe) This loads and saves the properties from the registry for cmd.exe.

__Image 2.1__: This loads and saves the properties from the Start Menu's shortcut for "Command Prompt". This is seperate from the Win+X Menu's shortcut.

__Image 2.1__: This loads and saves the properties from the Win+X menu's "Command Prompt" shortcut. This is seperate from the Win+X Menu's shortcut.

So, there's actually 4 places that are saving their own properties uniquely here. Once you've saved the properties for one of these, they won't load from the defaults anymore.

And yes, this is very confusing. Its unfortunately hard to introduce a mechanism by which we could make this behavior more transparent or intuitive, while also supporting everything we currently support.

There is not much you can do automatically if the user has added custom settings to custom shortcuts or specific programs in the registry. But I think colortool should at least modify the default shortcuts (lnk) that Windows creates by default for cmd and powershell, and powershell's registry.

In addition, maybe adding the ability to pass a shortcut/registry console name to apply settings for, so that a user can update his custom entries can be useful.

I use this project - concfg clear will get rid of per-shortcut and per-console registry settings so that everything uses the default. You may have to run it separately on shortcuts it doesn't know about though.

@parkovski Thank you for the excellent tip. concfg clear.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

privacyguy123 picture privacyguy123  路  131Comments

MoshiBin picture MoshiBin  路  128Comments

conioh picture conioh  路  65Comments

cinnamon-msft picture cinnamon-msft  路  62Comments

Byloth picture Byloth  路  56Comments