WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Dark blue text on black background unreadable

Open oliversalzburg opened this issue 10 years ago • 53 comments

It seems some output of the bash is usually in dark blue on black background. This is impossible to read. image

Changing the background color of the window to a different color is pointless, because the blue output actually defines a black background. image

  • Expected results There would either be a default color scheme that makes more sense or the option to change it.
  • Actual results (with terminal output if applicable) See above
  • Your Windows build number 14393.51

oliversalzburg avatar Aug 18 '16 12:08 oliversalzburg

cd ~ vim ~/.bashrc paste this at bottom of file LS_COLORS=$LS_COLORS:'di=0;36' ; export LS_COLORS PS1='[\033[1;36m]\u[\033[1;31m]@[\033[1;32m]\h:[\033[1;35m]\w[\033[1;31m]$[\033[0m] ' save exit . .bashrc (note the space between the two dots)

image

LFBernardo avatar Aug 18 '16 12:08 LFBernardo

Did you restart your console after applying the background colour @oliversalzburg? A full restart of the console is required.

annoyingly

ConnorVG avatar Aug 18 '16 15:08 ConnorVG

@ConnorVG Very interesting. That does change the outcome indeed. However, not fully. image blkid.tab still has the wrong background color, but this definitely helps.

I also realized that when you adjust the RGB values for black, that takes effect immediately.

I also now realized something else. It is possible to adjust all colors, it's just cumbersome af. You can click any of the colors on the palette, which selects it as the default background color, then you can adjust that palette index's RGB values and switch the background back to the palette index you had before. Then you repeat that for every single color you want to adjust and hope that you don't kill yourself in the process.

oliversalzburg avatar Aug 19 '16 07:08 oliversalzburg

@oliversalzburg yeah - it's a bit brutal. It took me way too long to achieve this: image

ConnorVG avatar Aug 19 '16 08:08 ConnorVG

@LFBernardo Those additions to my .bashrc have no effect. Only when I start another bash from bash, then they're applied. No idea why that is.

oliversalzburg avatar Aug 19 '16 08:08 oliversalzburg

@ConnorVG Looking good. I would assume this information is stored somewhere, but I couldn't find anything in the registry so far. :\

oliversalzburg avatar Aug 19 '16 08:08 oliversalzburg

I have to say that the default dark red looks terrible on 3 of my 4 monitors as well, the only one that it looks ok on has really broken color settings anyway.

The dark blue is also a problem in vi .. so maybe remapping the color is the better option :|

oliver: that should take effect after you exit your bash and open a new one .. of course you can just past the command to your bash for it to take effect in the current one

ericblade avatar Aug 19 '16 11:08 ericblade

@oliversalzburg that is very weird, but then again there seems to be subtle difference between the three machines I am running now as well that reach beyond appearance. Copy and paste for example, works on one but not the other two, have to select the Ubuntu icon at the top to do that..... But that is why it isn't a full release yet so that we can help them iron out the bugs. The blue definitely has to go, not just in WSL but also in other versions of linux, it's never properly visible and has been a pain in the butt for many years. I suggest googling LS_COLORS and seeing the other configuration options?

LFBernardo avatar Aug 19 '16 13:08 LFBernardo

@LFBernardo The funny thing is that I have already set LS_COLORS. I'm actually running dircolors, but none of this has any effect unless I start bash again from within the first bash.

oliversalzburg avatar Aug 19 '16 14:08 oliversalzburg

@ConnorVG Your console is looking awesome. How do I customize console colors like that?

ni554n avatar Aug 25 '16 06:08 ni554n

@oliversalzburg - How are you starting dircolors or whatever?

The default Bash.exe doesn't do a login shell yet. (It just reads .bashrc.) If you do su - <username> or bash -l (after starting Bash.exe), you'll get both .bashrc and .bash_profile, etc. Maybe that is why you aren't getting the right colors until you start a new bash from within Bash.exe? (My dircolors is in .bashrc at present, but maybe yours is in .bash_profile?)

I definitely agree that the default WSL install should come with default coloring in the Console that is readable, without the user making changes, whether with ls or vim or whatever. On the other hand, maybe it is possible for the user to make changes in Console defaults that then clash with changes made to bash's terminal settings (LS_COLORS, dircolors, whatever.)

rodrymbo avatar Aug 25 '16 14:08 rodrymbo

@rodrymbo I think I reverted most of my initial attempts, but AFAIR, I used /etc/bash.bashrc. But I guess what you're saying is something to take into consideration.

As it always was, using a different console emulator is the way to go as it seems: image

oliversalzburg avatar Aug 25 '16 15:08 oliversalzburg

@oliversalzburg - may we ask which terminal emulator you selected? Looks like it might be ConEmu.

I mostly just use PuTTY, since I'm used to it.

It'll be good to get the Console working as a terminal emulator for Bash.exe...

rodrymbo avatar Aug 25 '16 17:08 rodrymbo

@rodrymbo Yes, that is ConEmu. Sorry for not mentioning it.

oliversalzburg avatar Aug 25 '16 17:08 oliversalzburg

First off, this is kind of a dupe of #366, but I'm going to mark that one as a dupe as this one has WAY more discussion.

MSFT:8661767 is our internal number for updating the color palette. I'm not sure if we'll have time to do it in this particular round of updates, but we've definitely got our eye on it. Bother @bitcrazed on twitter (his work handle is @richturn-ms) if you want to see it done sooner :P.

Moreso, which I've definitely mentioned before but bears repeating because it came up on this thread - I'm very aware of how hard it is to work with the colors dialog currently. It's personally high on my list of priorities, but not necessarily so high on our overall priorities.

zadjii-msft avatar Oct 04 '16 22:10 zadjii-msft

One workaround (or the only one that really worked for me) is to install the solarized-dark theme from https://github.com/neilpa/cmd-colors-solarized (close/open the console window to activate)

laktak avatar Nov 18 '16 07:11 laktak

@zadjii-msft I can't understand why this has such low priority. After enabling the WSL you just want to work with the bash. If I first have to fiddle around to have a color scheme one can actually work with - that's really bad in terms of usability.

Trainmaster avatar Apr 14 '17 11:04 Trainmaster

Since now 24-bit color only works with default shell (without open API), we don't have other choices (like ComEmu), hence I think MS is responsible for the user experience of the default shell, especially the appearance and editing experience (I wish something like Cmder, but maybe that's too much, at least it should be usable).

JimAmuro avatar Apr 14 '17 14:04 JimAmuro

@Trainmaster -- I agree for what it's worth that this is important. But I can see why it wouldn't be top priority: I personally have no desire to reconfigure the defaults for the Windows console. In fact, I often go out of my way to configure other shells on other platforms to more-closely match what the default Windows shell does, because for my eyes it is more readable. (I didn't start off using this color scheme; I've settled on it after some experimentation.) Perhaps some people on the WSL team happen to have eyes whose color responsiveness is closer to mine than to yours?

aseering avatar Apr 14 '17 16:04 aseering

I have a problem here I use @LFBernardo 's solution to adjust ls color, and it works pretty well However, when I use zsh's tab-auto-complete, it turns out the same color as before. Anyone has idea?

I type cd and hit tab image

Po-wei avatar Apr 27 '17 12:04 Po-wei