View previous topic :: View next topic |
Author |
Message |
Techie2000 Guru
Joined: 16 May 2002 Posts: 344
|
Posted: Tue Sep 10, 2002 1:34 am Post subject: Bash Profile not working in GNOME terminal? |
|
|
My /etc/profile looks like:
Code: |
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/profile,v 1.12 2002/05/12 21:48:18 azarah Exp $
if [ -e "/etc/profile.env" ]
then
source /etc/profile.env
fi
#077 would be more secure, but 022 is generally quite realistic
umask 022
if [ `/usr/bin/whoami` = 'root' ]
then
if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
then
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
then
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/usr/bin:${PATH}"
fi
unset ROOTPATH
export EDITOR="/usr/bin/nano"
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
export INPUTRC="/etc/inputrc"
fi
|
In a regular terminal screen it looks like Gentoo [foldername] # but in an xterm or in a GNOME terminal it just says bash-2.05a _________________ "And I'm right. I'm always right, but in this case I'm just a bit more right than I usually am." - Linus Torvalds |
|
Back to top |
|
|
Michi n00b
Joined: 09 Aug 2002 Posts: 5
|
Posted: Tue Sep 10, 2002 1:55 pm Post subject: |
|
|
Same here ...
Anyone got a solution?
When you do 'su -' you get the prompt I want when I open it _________________ --
Michi
-- |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Sep 10, 2002 4:52 pm Post subject: |
|
|
If you use startx, ~/.bashrc will set your prompt for non-login shells. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
proxy Apprentice
Joined: 20 Apr 2002 Posts: 260 Location: Chantilly, VA
|
Posted: Tue Sep 10, 2002 6:00 pm Post subject: |
|
|
newest baselayout puts new .bashrc and new .bash_profile in your /etc/skel directory which shoudl fix this:
(they moved all the fancy stuff the .bashrc and have .bash_profile source that now, much better).
copy them (or merge if neccessary) to your home dir....all better
proxy |
|
Back to top |
|
|
Michi n00b
Joined: 09 Aug 2002 Posts: 5
|
Posted: Wed Sep 11, 2002 9:22 am Post subject: |
|
|
Thanks for the solution.
I copied the .bashrc and .bash_profile to my home dir. This only changed the title of the terminal but not the prompt. Added the lines from /etc/profile to .bashrc and ... it all works _________________ --
Michi
-- |
|
Back to top |
|
|
|