Bugzilla – Bug 119238
xterm doesn't properly source /etc/bash.bashrc
Last modified: 2005-10-09 09:15:18 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\$')
you have a ~/.bashrc ? how does it look like?
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
See above for required info
I would rather like to know if this works with xterm or from the linux console
works as expected from VT (console), but not from any shell spawned in X (xterm, gnome-terminal, konsole, etc...)
excellent - that's all I need to know :)
I don't see any mention of xterm's "-ls" option.
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.