6

I am a Git Bash user who is now switching to Debian. Here was my Git Bash's look:

enter image description here

Here is my look on Debian:

enter image description here

  • My .bashrc file is completely EMPTY. I have nothing in there currently.

  • I've been researching color in Linux for hours. Trust me, I've exhausted my options.

  • I don't want to use a custom program, download packages, run a script, or use a wrapper for Terminal. I just want my terminal colored how it looks in the GitBash image OR how Command Prompt displays color.

  • I don't want to change the text background, I want to change my terminal background. I personally would like Black, not grey.

Thank you.

  • Assuming that terminal is xterm, you can set the foreground and background colours in ~/.Xresources... – jasonwryan Feb 11 '16 at 5:56
  • Try to add the colors by editing your .bashrc file like _ $ export PS1='[\033[00;35m]\u[\033[00m]@[\033[00;35m]\H[\033[00m]:[\033[00;33m]\W[\033[00m] \$[\033[00;34m '_ – Ramesh Chand Feb 11 '16 at 7:10
  • Edit -> Profile Preferences -> Colors: Uncheck "use colors from system theme" and choose "Green on Black" – Joe Feb 11 '16 at 8:23
10

In your Terminal, klick Edit > Profile Preferences > Colors

See the Text and Background Color
Uncheck the Use colors from system theme
And set the Build-in schemes: to: Gray on black

Profile Preferences Screenshot

  • 1
    Can't believe it was that simple – Hatefiend Feb 17 '16 at 3:55
  • @Hatefiend, when you're unfamiliar with a new thing, even the most simple Tasks can be a challange ;) You also might want to throw an eyeball at this script here github.com/git/git/blob/master/contrib/completion/git-prompt.sh. The installation Guide is in line 8-30. This script will make your bash look like the on in Windows. By that I mean; showing you the git branch name you're currently in. And I think the colors will get adapted too. – Harrys Kavan Feb 17 '16 at 9:57
1

Terminal colors aren't set in the shell (text colors can be, though, for things like 'ls'). They're specific to the terminal application.

In the first picture, it looks like xterm (although I've been informed it is not). I'm guessing the second picture is GNOME Terminal.

If you want to use xterm, it may already be on your system; if not, it's just an apt-get install xterm away. xterm is a bit clunky to configure if you're new to Linux, though - it uses X resources, which aren't well supported these days (KDE always mucks mine up - I think GNOME is OK, though). You'll edit either the .Xdefaults or .xresources file in your home directory and add lines like:

XTerm*pointerColor: red
XTerm*printerCommand: lpr
XTerm*reverseVideo: false
XTerm*reverseWrap: true
XTerm*saveLines: 500

That reverseVideo line will give you a black background with white text. I have about twenty lines for XTerm in my .Xdefaults.

You should be able to set color schemes for GNOME terminal via the menus up top - according to the docs, it'll be Edit -> Profile Preferences -> Colors. Uncheck "Use colors from system theme" and then select a color scheme (or customize one) that you like.

GNOME Terminal is slower, but it has a lot more modern features than xterm. I use xterm because it's fast and I've used it for twenty years, so I'm used to it.

  • The first picture doesn't look like xterm (scrollbars differ). – Thomas Dickey Feb 11 '16 at 9:36
  • 1
    IIRC, you can compile XTerm with different scrollbars. I'm unfamiliar with mingw so I don't know what it uses by default. – Jeff Spaulding Feb 11 '16 at 15:06
  • Agreeing that xterm is suitable for OP (black starts out as black, rather than some illegible shade of gray chosen to match the desktop backgrounds), but MinGW wouldn't be running X or xterm (that picture might be mintty or a wrapper around Windows console - I've seen but not investigated). xterm's scrollbars don't have arrows on them, nor do the variants have something just like that - see FAQ). – Thomas Dickey Feb 12 '16 at 9:23
  • 1
    Learn something every day, I suppose. I like the default scrollbars so I never learned much about using the other ones. – Jeff Spaulding Feb 12 '16 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.