Problem solved now.
Hereinunder is my solution.
1) Replaced both /root/.bashrc and /home/satimis/.bashrc
with the attached file which was found from Internet.
2) Edited /etc/hostname localhost (only one word)
3) Rebooted the PC
On Konsole window now it displays ROOT [EMAIL PROTECTED] root]#
USER [EMAIL PROTECTED] satimis]$
All words in black colour
Lot of thanks for your kind advice and time spent.
B.R. Stephen
Robert Crawford wrote:
Stephen, What's your /etc/hosts file look like? Mine is:
127.0.0.1 localhost mymachine
Maybe Tom's previous post (quoted below) is what we both need in /etc/skel/.bashrc?
[ -f /etc/profile ] && . /etc/profile
However, all seems to work fine with how I have it now- I was informed on the Gentoo forum to do what I have done.
Hmmm. just looked at my /etc/skel/.bashrc, and I forgot I had added this line, when I was figuring out the cfg-update replacement for Gentoo's etc-update. This looks relevant to what we're talking about, but it didn't change my xterm prompt at all.
# The following is added by me to source /etc/profile [ -f /etc/profile ] && source /etc/profile
Come to think of it, I was having trouble getting x to open an xxdiff window from an xterminal after put the cfg-update perl script into /usr/local/bin, and the author of the script advised me to add that line to /etc/skel/.bashrc, and it fixed my problem.
Robert
On Saturday 25 October 2003 7:51 pm, Stephen Liu wrote:
Hi Robert and folks
# echo "source /etc/profile" >>/home/satimis/.bashrc
NOW becomes As ROOT mymachine root #
As USER [EMAIL PROTECTED] satimis $
How to change them to; As ROOT [EMAIL PROTECTED] root]#
As USER [EMAIL PROTECTED] satimis]$
B.R. Stephen
Robert Crawford wrote:
Try placing this line at the end of your ~/.bashrc file- it worked for me.
source /etc/profile
This will also show the current directory if you cd to another directory, instead of just the bash-2.05b$ prompt.
Robert Crawford
On Saturday 25 October 2003 1:06 pm, Stephen Liu wrote:
Hi all folks,
Gentoo 1.4 ==========
On KDE Konsole window
As ROOT, it prompts mymachine root #
not as [EMAIL PROTECTED] root]#
As USER bash-2.05b$ the bash version, not as
[EMAIL PROTECTED] satimis]$
Kindly advise how to change them back
Thanks
B.R. Stephen Liu
# /etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
umask 002
else
umask 022
fi
# are we an interactive shell?
if [ "$PS1" ]; then
if [ -x /usr/bin/tput ]; then
if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
elif [ -x /usr/bin/wc ]; then
if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
fi
fi
fi
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne "\033]0;[EMAIL
PROTECTED]:${PWD/#$HOME/~}\007"'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne "[EMAIL PROTECTED]:${PWD/#$HOME/~}\033\\"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] &&
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[EMAIL PROTECTED] \W]\\$ "
# PS1="[EMAIL PROTECTED] \h\033\[m \w\]\\$\[\e\[m\] "
if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
. $i
fi
done
fi
fi
# vim:ts=4:sw=4
-- [EMAIL PROTECTED] mailing list
