lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.48k stars 1.46k forks source link

Any way to get rid of this ugly RED terminal color? #4781

Open liquidcms opened 2 years ago

liquidcms commented 2 years ago

Was sure i had posted this already but can't find it anywhere.

Does anyone know how to change the terminal colour from this ugly RED?

image

This was with 5.3.3 and remains with 5.3.4.

Windows10.

jim-docker commented 2 years ago

Hi, I can't reproduce this. Does it happen just in pod shells? Just for some pods?

liquidcms commented 2 years ago

I have fixed it. Pretty sure an issue in Lens but i'll try to explain the steps i went through to fix it.

First, will answer your question. When i first start lens terminal window or a terminal for any pod it is white on black.. as soon as i type anything, it switches to the scheme shown above.

I looked in my Windows system at 3 different shells: Power Shell, Std windows cmd shell, git bash.

PS: blue bg, white promt, yellow text. (likely default as i never us PS) cmd: light yellow bg with blue text (i may have defined at some point as it is not std white on black) git bash: white bg with multiple colours for various things (maybe default)

this is where it gets weird.

I know that the way lens shell starts is cmd shell default (look, even though it says PS in prompt); so i went to edit properties of cmd shell and i saw it showed example as the ugly red bg i see in lens shell - even though this is not what i get in my windows cmd shells. I set it to std white on black. Re-tried lens terminal and problem solved.

Oddly, my windows cmd shell colours remained as they had been. When i again go to look at windows cmd properties; they now match what it is actually using (blue on a light yellow bg). If i resave this, nothing changes for any terminal including Lens.

Still odd, Lens terminal suggests it is using Power Shell but the colours are not what i get for PS outside of Lens.. and seem to be controlled by settings for CMD terminal.

Ideally i think that Lens terminal should explicitly set up its terminal and maybe provide options to change that set up.

Nokel81 commented 2 years ago

@liquidcms We do indeed start a Powershell instance by default on windows and not a CMD instance.

The colours you are referring to are from the GUI of Powershell and CMD and are not transmitted when there is a pseudoterminal interface going on.

We have our own terminal emulator within Lens (xterm.js currently) that renders the terminal in browser (since Lens is an electron app).


What did you do just before it stopped showing red?

liquidcms commented 2 years ago

as i mentioned above.. when i changed the colours for the cmd terminal.