Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14498 - terminal ignores .bashrc settings
Summary: terminal ignores .bashrc settings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-24 13:36 UTC by Ricardo Campos
Modified: 2003-01-29 02:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Campos 2003-01-24 13:36:54 UTC
All of my terminals ignore the settings in .bashrc (such as coloured outpul of ls).
Comment 1 SpanKY gentoo-dev 2003-01-24 15:21:47 UTC
try this:
echo 'echo profile' > ~/.bash_profile
echo 'echo rc' > ~/.bashrc

then launch a new terminal ... if profile is run, then nothing is wrong ... just
put this into your .bash_profile:
[ -e ~/.bashrc ] && . ~/.bashrc
Comment 2 Ricardo Campos 2003-01-24 16:42:40 UTC
Sorry, that didn't help. 
The contents of my bash_profile was:
PS1="[\u@\h \W]\$"
[ -f ~/.bashrc ] && . ~/.bashrc

Here's my .bashrc incase that's needed:


# 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/skel/.bashrc,v 1.5 2002/08/07
18:13:35 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"

# Change the window title of X terminals 
case $TERM in
	xterm*|rxvt|eterm)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
		;;
	screen)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
		;;
esac

##uncomment the following to activate bash-completion:
[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-26 01:33:03 UTC
1)  Check that you have a valid shell (should be /bin/bash if you want to use
.bashrc) in /etc/passwd, else it will default to /bin/sh, which wont use .bashrc.

2)  Consider changing the preferences of the terminal you use to act as a
'login shell'.
Comment 4 Ricardo Campos 2003-01-29 02:23:18 UTC
Yes, it was defaulting to sh (even though the propmt said bash!) and changing
the terminals to a login shell got it working. Many thanks!