You are not logged in.
Pages: 1
I had to delete my account and recreate it - long story.
Anyway when I load up Konsole I get sh-4.2$ for a prompt I no longer get [name@compname ] - the only way I can is by source .bashrc
My .bash_profile is below :
#
# ~/.bash_profile
#
#[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export PS1='\[\e[0;31m\]\u\[\e[0m\]\[\e[1;31m\]@\[\e[0m\]\[\e[0;31m\]\H\[\e[0m\] \w $ '
source ~/.bashrc
my .Bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls -1sh --color=auto'
PS1='[\u@\h \W]\$ '
/etc/profile
# /etc/profile
#Set our umask
umask 022
# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
Any help at all please I have searched over two hours on web forums and nothing has fixed the issue.
Last edited by jasonwryan (2013-02-03 01:53:48)
Offline
Do you have any strange environment variables? And does it suddenly get sourced if you run bash from within bash? Try "sudo bash", "sudo -u your_user bash" and "su -c bash" variants too.
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline
I had to delete my account and recreate it - long story.
Anyway when I load up Konsole I get sh-4.2$ for a prompt I no longer get [name@compname ] - the only way I can is by source .bashrc
My .bash_profile is below :
# # ~/.bash_profile # #[[ -f ~/.bashrc ]] && . ~/.bashrc if [ -f ~/.bashrc ]; then . ~/.bashrc fi export PS1='\[\e[0;31m\]\u\[\e[0m\]\[\e[1;31m\]@\[\e[0m\]\[\e[0;31m\]\H\[\e[0m\] \w $ ' source ~/.bashrc
Any help at all please I have searched over two hours on web forums and nothing has fixed the issue.
I set my prompt in ~/.bashrc. ~/bash.profile modifies my PATH, and then sources .bashrc in the way you do.
Offline
nwenclaff, it could be that Konsole is invoking bash via /bin/sh symlink. When invoked as 'sh', bash will not read ~/.bash* files, because it's emulating the POSIX shell. Try configuring Konsole so that it invokes 'bash' instead of 'sh' and I hope that should fix your issue.
Offline
.bash_profile is only sourced once so I would try putting your PS1 in .bashrc instead.
Offline
I recently had this same issue and based off of vv's advice, this is what fixed it for me:
As root
usermod --shell /bin/bash "${your_user_name}"
The shell was previously /bin/sh
Offline
As stated above you can change your default shell. It does indeed sound as though your default shell is set to /bin/sh. Check out the file /etc/passwd and see what the shell is on the line with your name. If it says /bin/sh that explains it, and you need to do what is offered in the post above (#6).
Offline
Pages: 1