geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


Color in Terminal?
Miscellaneous Posted by Paul Cameron on Thursday July 19, @10:33PM
from the plain-no-color-terminal dept. dept.
FreeBSD comes with a plain boring black and white terminal. This is both in a normal console and in x. Anyone know how we could add color to this beast? I like the ability to distinguish directorys from normal files at a quick glance without having to use the -la option.


<  |  >

 

Related Links
  • Articles on Miscellaneous
  • Also by Paul Cameron
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: Color in Terminal?
    by Jason on Friday July 20, @10:22AM

    I am with you on this one Paul. I also like to have a colorized console. I've found that there are two basic ways to achieve colorized output:

    1. If you have a rescent copy of FreeBSD (say 4.x) then you can use the -G option with the ls command. Use man ls to check the options and switches. This works great, but I don't like the color scheme.

    2. The option I prefer is to install the gnuls (gnu ls) port in /usr/ports/misc/gnuls. I think the colors are much nicer. After the install, type: gnuls --color The command is long- so the way I handle this is to write a script called lls continaing the command gnuls --color and I put it in /usr/local/bin. I then chmod the command for execute by all (chmod 755 /usr/local/bin/lls). You can set the permissions to your taste.

    Both of these options will allow you to display files in an X terminal with color.

    Have fun.


    [ Add a Reply to this ]
    Re: Color in Terminal?
    by Clayton Tucker on Sunday July 29, @01:15PM
    To color Xterm put this in $HOME/.Xdefaults:

    xterm*foreground: green
    xterm*background: black
    xterm*cursorColor: red
    xterm*highlightColor: dark blue
    xterm*scrollBar: True
    xterm*rightScrollBar: True
    xterm*saveLines: 200
    [ Add a Reply to this ]
    Re: Color in Terminal?
    by John Hall on Thursday September 19, @09:33AM
    Sweet!, I followed the recommendation to install gnuls on my freebsd machine. What I did to cheat was renamed /bin/ls to /bin/ls-backup and created a text file with the following line:

    #/usr/local/bin/bash
    /usr/local/bin/gnuls --color

    saved it and chmod'd it to 755 now when you type ls it act's normal with color :)
    [ Add a Reply to this ]
    Re: Color in Terminal?
    by eriol on Thursday October 03, @05:22AM
    but what about applications like jed and such?
    they will still be in black and white...:(
    [ Add a Reply to this ]
    Re: Color in Terminal?
    by eriol on Thursday October 03, @05:25AM
    but what about applications like jed and such?
    they will still be in black and white...:(
    [ Add a Reply to this ]
    Re: Color in Terminal?
    by eriol on Thursday October 03, @05:28AM
    but what about applications like jed and such?
    they will still be in black and white...:(
    [ Add a Reply to this ]
    Re: Color in Terminal?
    by yvin on Saturday February 15, @12:40PM

    if you use csh/tcsh: in .cshrc add:

    alias ls ls -G setenv TERM xterm-color

    if you use bash do something like:

    alias ls ls -G export TERM=xterm-color


    [ Add a Reply to this ]
    Re: Color in Terminal?
    by duble on Friday May 20, @12:21PM
    this should work in any terminal program including xterm without having to alias or script anything.

    put theses 4 lines in your shell's profile file:

    CLICOLOR="YES"
    export CLICOLOR
    LSCOLORS="ExGxFxdxCxDxDxhbadExEx"
    export LSCOLORS
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]