Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bash Profile not working in GNOME terminal?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Techie2000
Guru
Guru


Joined: 16 May 2002
Posts: 344

PostPosted: Tue Sep 10, 2002 1:34 am    Post subject: Bash Profile not working in GNOME terminal? Reply with quote

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
View user's profile Send private message
Michi
n00b
n00b


Joined: 09 Aug 2002
Posts: 5

PostPosted: Tue Sep 10, 2002 1:55 pm    Post subject: Reply with quote

Same here ...
Anyone got a solution?

When you do 'su -' you get the prompt I want when I open it :)
_________________
--
Michi
--
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Sep 10, 2002 4:52 pm    Post subject: Reply with quote

If you use startx, ~/.bashrc will set your prompt for non-login shells.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
proxy
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 260
Location: Chantilly, VA

PostPosted: Tue Sep 10, 2002 6:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Michi
n00b
n00b


Joined: 09 Aug 2002
Posts: 5

PostPosted: Wed Sep 11, 2002 9:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum