LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Enabling color function on Xfce Terminal (https://www.linuxquestions.org/questions/slackware-14/enabling-color-function-on-xfce-terminal-727821/)

phys 05-22-2009 11:39 AM

Enabling color function on Xfce Terminal
 
Hello;
I want "Xfce Terminal" to view files and folders in different color as in below link. I could not enable this function on my Slack box.
http://www.xfce.org/projects/terminal
Thanks...

David the H. 05-22-2009 02:25 PM

It depends on the program. Certainly your terminal has color support already, but the program you use also has to provide its output in color (or to be more accurate, to insert ascii color escape sequences into its output that can be read by the display). for example, try "ls --color=auto" or "--color=always". grep also has a color option.

For a pager, like less, you also need to enable display of "raw control characters" (the -r or -R options in less).

mdg 05-22-2009 02:40 PM

Try adding this to your ~/.bashrc file:
Code:

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    #alias rm 'mv \!* ~/TRASH'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
fi

Save, then restart your window manager.

phys 05-22-2009 03:00 PM

Thank you very much David and mdg. It did work.


All times are GMT -5. The time now is 10:55 PM.