Bug 119238 - xterm doesn't properly source /etc/bash.bashrc
Summary: xterm doesn't properly source /etc/bash.bashrc
Status: RESOLVED INVALID
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: RC 1
Hardware: Other All
: P5 - None : Normal
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 14:36 UTC by Brent Selch
Modified: 2005-10-09 09:15 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Selch 2005-09-28 14:36:09 UTC
When starting konsole with my shell set to /bin/sh (which is a symlink to bash),
nothing is read from /etc/bash.bashrc. When logging in from a VC, or from a
remote connection, it is. This can be verified by the setting or lack of setting
PS1 as defined in /etc/bash.bashrc (echo $PS1 should return '$(ppwd
\l)\u@\h:\w>', but instead returns the bash default of '\s-\v\$')
Comment 1 Dirk Mueller 2005-09-28 20:50:34 UTC
you have a ~/.bashrc ? 
 
how does it look like? 
 
 
Comment 2 Brent Selch 2005-09-29 14:46:29 UTC
I have the default .bashrc:
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg

# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells
# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
# settings made here will also take effect in a login shell.
#
# NOTE: It is recommended to make language settings in ~/.profile rather than
# here, since multilingual X sessions would not work properly if LANG is over-
# ridden in every subshell.

# This might be helpful for Linux newbies who previously used DOS...
test -f /etc/profile.dos && . /etc/profile.dos

# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :-)
#export EDITOR=/usr/bin/vim
#export EDITOR=/usr/bin/mcedit

# For some news readers it makes sense to specify the NEWSSERVER variable here
#export NEWSSERVER=your.news.server

# If you want to use a Palm device with Linux, uncomment the two lines below.
# For some (older) Palm Pilots, you might need to set a lower baud rate
# e.g. 57600 or 38400; lowest is 9600 (very slow!)
#
#export PILOTPORT=/dev/pilot
#export PILOTRATE=115200

test -s ~/.alias && . ~/.alias || true
Comment 3 Brent Selch 2005-10-04 13:38:11 UTC
See above for required info
Comment 4 Stephan Kulow 2005-10-06 13:59:40 UTC
I would rather like to know if this works with xterm or from the linux console  
Comment 5 Brent Selch 2005-10-07 19:13:45 UTC
works as expected from VT (console), but not from any shell spawned in X (xterm,
gnome-terminal, konsole, etc...)
Comment 6 Stephan Kulow 2005-10-07 19:35:21 UTC
excellent - that's all I need to know :) 
Comment 7 Thomas Dickey 2005-10-08 14:39:09 UTC
I don't see any mention of xterm's "-ls" option.
Comment 8 Dr. Werner Fink 2005-10-09 09:15:18 UTC
The reporter is NOT using the bash but sh.  The bash called as
sh does NOT source /etc/bash.bashrc because it works as ordinary
bourne shell.  This is what POSIX requires.

If the xterm is called with `-ls' the shell is a login shell and
there the /etc/profile is sourced ... this has nothing todo with
the system wide /etc/bash.bashrc for the bash.