LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Console Text Color Change (https://www.linuxquestions.org/questions/slackware-14/console-text-color-change-445171/)

Mercurius 05-15-2006 08:35 PM

Console Text Color Change
 
Ok ... basic question ... how can I change the text of my console to green?

Slacker_Rex 05-15-2006 09:27 PM

Not sure what distro you use, but with Slackware, a file:

/etc/DIR_COLORS

is what controls this.

If you google some for it, it is not too hard to find more than you ever wanted to know about how to customize your shell.

dive 05-16-2006 12:41 AM

usually in .Xresources you can specify colours for your term. Eg:

Code:

aterm*foreground: green
aterm*background: black

xterm*foreground: green
xterm*background: black

urxvt*foreground: green
urxvt*background: black

etc. man xterm or xterm --help for full options.

After changing the file you may need to do:

xrdb -merge ~/.Xresources

Mercurius 05-16-2006 01:49 AM

No no ... I meant in bash, without GUI ...

stitchman 05-16-2006 02:13 AM

theres also a nice little program called Color Wrapper, search on freshmeat.net for it. It adds tasteful color to common commands to brighten up the CLI, it also works for terminals in Xwindows too.

dugan 05-16-2006 03:32 AM

I think you'll enjoy this:

http://forums.gentoo.org/viewtopic-t-289943.html

It's some really amazing console customization.

dive 05-16-2006 07:35 AM

Quote:

Originally Posted by Mercurius
No no ... I meant in bash, without GUI ...

Probably setterm is what you want:

Code:

setterm
  [ -term terminal_name ]
  [ -reset ]
  [ -initialize ]
  [ -cursor [on|off] ]
  [ -repeat [on|off] ]
  [ -appcursorkeys [on|off] ]
  [ -linewrap [on|off] ]
  [ -default ]
  [ -foreground black|blue|green|cyan|red|magenta|yellow|white|default ]
  [ -background black|blue|green|cyan|red|magenta|yellow|white|default ]
  [ -ulcolor black|grey|blue|green|cyan|red|magenta|yellow|white ]
  [ -ulcolor bright blue|green|cyan|red|magenta|yellow|white ]
  [ -hbcolor black|grey|blue|green|cyan|red|magenta|yellow|white ]
  [ -hbcolor bright blue|green|cyan|red|magenta|yellow|white ]
  [ -inversescreen [on|off] ]
  [ -bold [on|off] ]
  [ -half-bright [on|off] ]
  [ -blink [on|off] ]
  [ -reverse [on|off] ]
  [ -underline [on|off] ]
  [ -store ]
  [ -clear [all|rest] ]
  [ -tabs [ tab1 tab2 tab3 ... ] ]      (tabn = 1-160)
  [ -clrtabs [ tab1 tab2 tab3 ... ] ]  (tabn = 1-160)
  [ -regtabs [1-160] ]
  [ -blank [0-60] ]
  [ -dump  [1-NR_CONSOLES] ]
  [ -append [1-NR_CONSOLES] ]
  [ -file dumpfilename ]
  [ -msg [on|off] ]
  [ -msglevel [0-8] ]
  [ -powersave [on|vsync|hsync|powerdown|off] ]
  [ -powerdown [0-60] ]
  [ -blength [0-2000] ]
  [ -bfreq freqnumber ]

It's called from /etc/rc.d/rc.M


All times are GMT -5. The time now is 01:34 AM.