LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2010, 01:21 PM   #1
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Rep: Reputation: 5
color problem


hello y'all, back to my regular need. after i made the change to my shell type, that from SH to TCH, and back again, i lost my coloring for my file system, if you know what i mean, folders always come in blue, and devices in yellow hope you understand? now everything i do can't seem to differentiated between files colors anymore. need help pls. thanks . hope to read from you guys soon
 
Old 11-18-2010, 02:10 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,788
Blog Entries: 1

Rep: Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340
Quote:
Originally Posted by Ribo01 View Post
hello y'all, back to my regular need. after i made the change to my shell type, that from SH to TCH, and back again, i lost my coloring for my file system, if you know what i mean, folders always come in blue, and devices in yellow hope you understand? now everything i do can't seem to differentiated between files colors anymore. need help pls. thanks . hope to read from you guys soon
I believe directory, pipes, files and such, are colored by the .dircolors file in the home directory. If that file isn't there, it might be causing the issue.
 
Old 12-15-2010, 12:51 PM   #3
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
file coloring

hello. yeah the .dircolors is'nt in my home directory, so what if i create it what would be put in it to get my colors back?
 
Old 12-16-2010, 03:58 AM   #4
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
When you start a shell, several scripts get run before you gain control. One of those sets aliases and environment variables instructing ls how to color things.

The easiest way? (1) Don't start a new sh session. Instead close the tch session and the original shell will be waiting for you. "exit" or ctrl+d will end a session.

Method (2) don't run sh. Run bash instead. Almost every system today runs bash instead of sh. In fact, sh is usually an alias for bash (in an sh compatibility mode). There are things bash runs (and sets up) that sh (or bash being run as sh) doesn't.

(sh is the Bourne Shell; bash is the Bourne Again Shell. Tacky acronym, but memorable )

(3) Run the login script directly to restore the missing environment elements. On my Debian system, this seems to take place in ~/.bashrc . I suggest:

Code:
source ~/.bashrc
or
Code:
. ~/.bashrc
(same thing)

Other files that might be involved include /etc/profile, ~/.bash_profile, ~/.bash_login, ~/.profile, and /etc/bash.bashrc

This all depends on which distribution you're running, and how the maintainers choose to set these up.
 
Old 12-16-2010, 11:36 AM   #5
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
still dont get it.

hello yeah got all that and really know how its works. forgot to mention, i created a new .bashrc in my home directory, and i have to put back everything in it. all i need now is the leeter or script or maybe command i have to put into my bashrc to get my file coloring back. and thanks to gd2hoe for the help. note am a redhat linux user. thanks again.
 
Old 12-18-2010, 09:26 AM   #6
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
color problem

hello yeah got all that and really know how its works. forgot to mention, i created a new .bashrc in my home directory, and i have to put back everything in it. all i need now the line to add into my bashrc to get my file coloring back. and thanks to gd2shoe for the help. note am a redhat linux user. thanks again.
 
Old 12-18-2010, 09:47 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Mark the thread as solved.
 
Old 12-27-2010, 02:47 PM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,788
Blog Entries: 1

Rep: Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340
Quote:
Originally Posted by Ribo01 View Post
hello yeah got all that and really know how its works. forgot to mention, i created a new .bashrc in my home directory, and i have to put back everything in it. all i need now the line to add into my bashrc to get my file coloring back. and thanks to gd2shoe for the help. note am a redhat linux user. thanks again.
Code:
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:'

alias ls='ls --color=auto'
There you go
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen App, Retain BG Color, Background color gets lost duerra Linux - Software 1 07-08-2009 04:01 PM
Color registration bars on output: Lexmark C510 Color Laser printer spud_linux Linux - Hardware 2 10-06-2008 01:46 PM
REQ: Gimp plugin fo automatic color correction and color masks Rick069 Linux - Software 1 04-15-2007 04:10 PM
[COLOR=red]ENCORE WIRELESS PCI Card 802.11b [/COLOR] enrique145 Linux - Hardware 3 07-07-2004 03:31 PM
[COLOR=seagreen]HELP-want to use Kickstart/rh7.2 on a notebook[/COLOR] verbali Linux - Newbie 1 05-13-2002 02:59 PM


All times are GMT -5. The time now is 08:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration