LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-19-2004, 09:48 PM   #1
Paxmaster
Member
 
Registered: Jun 2004
Location: unknown place in NYC
Distribution: Ubuntu
Posts: 377

Rep: Reputation: 30
can't the file bashrc


i have notice that slackware doesn't have bashrc in /etc and bash_profile, i used to have fc2 on my laptop but i have format it and install slackware10,
and in fc2 i have adjust DIR_COLOR and it work great, but now i am trying to do the same, it work in runlevel 3 and it don't work in runlevel
 
Old 11-20-2004, 12:19 AM   #2
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
What exactly is your question?
 
Old 11-20-2004, 01:40 AM   #3
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
If you want a sample DIR_COLOR or LS_COLOR, here's mine:
Code:
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:
bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:
*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:
*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.i386.rpm=01;31:*.i586.rpm=01;31:
*.src.rpm=01;30:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:
*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:'

Last edited by daihard; 11-20-2004 at 01:42 AM.
 
Old 11-20-2004, 01:56 PM   #4
Paxmaster
Member
 
Registered: Jun 2004
Location: unknown place in NYC
Distribution: Ubuntu
Posts: 377

Original Poster
Rep: Reputation: 30
hi i can't find bashrc in /etc
thanks daihard for LS_COLOR but i didn't it yet try it because i can't find bashrc file, my bash prompt is 2.5, sholuld i upgrade it
 
Old 11-20-2004, 02:06 PM   #5
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
Quote:
Originally posted by Paxmaster
hi i can't find bashrc in /etc
thanks daihard for LS_COLOR but i didn't it yet try it because i can't find bashrc file, my bash prompt is 2.5, sholuld i upgrade it
You can simply create your own bashrc file as ~/.bashrc. The bash shell reads it in automatically. As for the default /etc/bashrc, I don't think it's a problem not to have it. Mine is as simple as this:
Code:
# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile
PS1="[\u@\h \W]\\$ "

alias which="type -path"
 
Old 11-20-2004, 07:52 PM   #6
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
My slackware box has a /etc/profile but no /etc/bashrc.

Bash has three diffierent files that it reads at startup - profile, bash_profile and bashrc. Either one may be used, and they are all equally valid

--Ian
 
Old 11-20-2004, 09:30 PM   #7
Paxmaster
Member
 
Registered: Jun 2004
Location: unknown place in NYC
Distribution: Ubuntu
Posts: 377

Original Poster
Rep: Reputation: 30
very werid going on

my console in runlevel act differnt then in runlevel 5, I have fix my PS1 in runlevel 5 but not in console, other hand i have fix DIR_COLOR in console but not in xwindow. Looks like something is interfering with my console, and my bash in x window the LS_COLOR is not working.
 
Old 11-20-2004, 10:30 PM   #8
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
Re: very werid going on

Quote:
Originally posted by Paxmaster
my console in runlevel act differnt then in runlevel 5, I have fix my PS1 in runlevel 5 but not in console, other hand i have fix DIR_COLOR in console but not in xwindow. Looks like something is interfering with my console, and my bash in x window the LS_COLOR is not working.
Did you make sure you specified "--color=auto" or something like that with 'ls'?
 
Old 11-22-2004, 10:19 AM   #9
Paxmaster
Member
 
Registered: Jun 2004
Location: unknown place in NYC
Distribution: Ubuntu
Posts: 377

Original Poster
Rep: Reputation: 30
i have edit the menu and i add this aterm -tr -ls, now some reason it work now and i could see color in runlevel 5 could any tell wat is the propose of -ls

In the file .bashrc here what look like




if [ "$TERM" = "linux" ]
then
#we're on the system console or maybe telnetting in
export PS1="\e[32;1m[Paxmaster>\t]\e[31;1m"
else
#we're not on the console, assume an xterm
export PS1="\[\e]2;\u@\H\w\a\e[34;1m\]\u\[\e[34;m\]@\h:\[\e[33m\]\W\[\e[32m\$

fi

but now i have one more problem when I open a bash prompt above is a saying but i can't read it, because is it black letters and my screen is black, and also when i try to edit a file same thing happen the letter is back how could i fix this.


now i almost fix the problem by doing this i change this export PS1="\[\e]2;\u@\H\w\a\e[34;1m\]\u\[\e[34;m\]@\h:\[\e[33m\]\W\[\e[32m\$ to export PS1="\[\e]2;\u@\H\w\a\e[34;1m\]\u\[\e[34;m\]@\h:\[\e[33m\]\W\[\e[31;1m>"

this mean whenever i type at command it always show red, but other hand when type man
<filename> the letter is black how could i change it to white or other color

if some one who use slackware they will know what i am taking about the saying appear

thanks

Last edited by Paxmaster; 11-22-2004 at 11:10 AM.
 
Old 01-02-2005, 06:51 AM   #10
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Whenever I log out of SSH, I find that my colors are all gone. I have to keep "source .bashrc" before I begin my session. How can I make this permanent?
 
Old 01-02-2005, 06:58 AM   #11
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
All ok now, have added these lines to:

Code:
.bash_profile
 
  


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
reloading .bashrc file blackzone Linux - Newbie 8 03-02-2013 10:58 AM
Bashrc file Gins Linux - General 19 09-06-2005 03:19 PM
where is the .bashrc file??? xenia Linux - Newbie 8 05-08-2004 12:11 PM
bashrc file Linvilidiot Linux - Newbie 3 03-11-2004 04:08 PM
how to modify .bashrc file amadan_in Linux - Newbie 1 01-01-2003 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:31 PM.

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
Open Source Consulting | Domain Registration