LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 11-27-2005, 07:46 PM   #1
subG
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
bash prompt


Hello all, I searched this forum, but the thread I found didn't help.

I cannot get my .bashrc to function when I start konsole, without executing the following command:

Code:
wil@subG:~$ . .bashrc
Here are the contents of my .bashprofile :

Code:
#.bash_profile
#
# Source .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
And here is the contents of my .bashrc :

Code:
#.bashrc
#
# Add bin to path
export PATH="$PATH:$HOME/bin"
# Dynamic resizing
shopt -s checkwinsize
# Custom prompt
PS1='\[\033[0;31m\]\u\[\033[1;37m\]@\[\033[1;34m\]\h\[\033[0;31m\] | \[\033[1;37m\]\w\[\033[0;31m\] | \[\033[1;37m\]\T\n\\$'
# Add color
eval `dircolors -b`
Can anyone see where I have made an error?
 
Old 11-27-2005, 07:49 PM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
try setting the execute ("x") bit on .bashrc

chmod +x ~/.bashrc
 
Old 11-27-2005, 07:55 PM   #3
subG
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Nope, it still doesnt work.

I created my custom .nanorc, and it functions without error, so I'm clueless as to why the .bashrc fails.
 
Old 11-28-2005, 01:52 AM   #4
T.Hsu
Member
 
Registered: Jan 2005
Posts: 178

Rep: Reputation: 31
~/.bashrc should not be executable.

Are you sure your login shell is bash not sh etc.

echo $SHELL
 
Old 11-28-2005, 06:13 AM   #5
rangalo
Member
 
Registered: Jan 2005
Posts: 189

Rep: Reputation: 30
Hi,

I had also similar prob. when using konsole, just write everything in .bash_profile file instead of .bashrc or call .bashrc from .bash_profile.

it might be calling .bash_profile first..


cheers,
Hardik
 
Old 01-18-2006, 02:02 PM   #6
uglydot
Member
 
Registered: Mar 2003
Distribution: Gentoo
Posts: 232

Rep: Reputation: 30
Well, I just copied and pasted those code bits into a .bash_profile, and .bashrc. Saved, loaded up on konsole and it worked. So I'm not quite sure why it doesn't work for you, it's something else in your system.
 
Old 01-18-2006, 05:43 PM   #7
Oinopion
Member
 
Registered: May 2005
Location: Kraków, PL
Distribution: Slackware
Posts: 33

Rep: Reputation: 15
There are [at least] two types of shell interactive and login. Both are using different files. This You would use is IMHO ~/.profile, but read man bash for more exact infos.

There is also /etc/profile for use systemwide.

I'm not sure, but .bash_profile is called in both shells (inter. and login), and .profile is called only when using only one (don't know name :P ). Reason? F.e. You would like to have colorful shell prompt, but your programs don't use this...

Last edited by Oinopion; 01-18-2006 at 05:49 PM.
 
  


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
Changing Bash Prompt socks Slackware 11 02-09-2005 07:32 PM
Changing the BASH prompt? Dravis Linux - Software 2 01-22-2004 10:17 PM
help with bash prompt everythingand2 Linux - Newbie 7 12-06-2003 05:28 PM
Bash Prompt mandraketux Mandriva 2 11-28-2003 11:05 PM
Customize BASH Prompt kleptos Linux - Newbie 15 01-02-2003 01:01 PM


All times are GMT -5. The time now is 10:07 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration