baselayout 1.8.6.8-r1 includes changes to /etc/profile that test to see if $TERM='dumb' before setting PS1. Well, when logging into KDE 3.1.2 using KDM, apparently $TERM='dumb' at the time that /etc/profile is sourced. When I start Konsole, my bash shell uses the default prompt. If I modify /etc/profile as follows: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- if [ `/usr/bin/whoami` = 'root' ] then # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}" else ################################## # Test for borked baselayout upgrade ################################## export RKTEST=$TERM # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH="/bin:/usr/bin:${PATH}" fi =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- and then log back into KDE, when I echo $RKTEST at the shell prompt, RKTEST=dumb I'm assuming the baselayout maintainer is not a KDE person. =) Reproducible: Always Steps to Reproduce: 1. emerge baselayout 1.8.6.8-r1 2. Spend much time running etc-update 3. Log out and log back into KDE 3.1.2 using KDM 4. Start Konsole Actual Results: bash prompt uses bash default (bash-2.05b$) Expected Results: Use Gentoo default PS1 value from /etc/profile. Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20-gentoo-r2 i686 Intel(R) Xeon(TM) CPU 1700MHz GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 apm avi crypt cups encode gif jpeg libg++ libwww mikmod mmx mpeg ncurses nls png quicktime spell truetype xml2 xmms xv zlib gtkhtml gdbm berkdb slang readline arts aalib bonobo svga java guile X sdl gpm tcpd pam ssl python esd imlib oggvorbis gtk qt kde motif opengl ldap snmp -3dnow -gnome -oss acpi alsa apache2 cdr dga directfb dvd fbcon gtk2 imap matrox mozilla mysql pdflib perl prebuilt samba scanner smooth tiff" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe" CXXFLAGS="-march=pentium3 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j3" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache buildpkg fixpackages"
You are calling Konsole with the '-l' switch (login shell) ?
As far as I can tell, no. The .desktop file simply has "Exec=konsole".
The issue is basically: KDM/whatever do source /etc/profile during startup to get PATH and some other stuff correct. As you can see, this is however with TERM=dumb, meaning it is a child process (no tty attached) that does this. If you now launch a terminal in X, and you do not tell it to be a login shell, it *should* not source /etc/profile (note, this is a *nix design feature) - same as running su, and not 'su -'. To 'fix' it, you need to tell Konsole to behave as a login shell. Last time I checked, you need to add '-l' to the exec line in its .desktop. I do not know if it supports it as a option like gnome-terminal or multi-gnome-terminal.
Hmmm... well, OK. I filed this as a baselayout bug because the behavior changed as a result of upgrading baselayout. I suppose this needs to be assigned to the KDE package maintainer so that the default menu/shortcut entries for konsole include the login shell option (which is --ls).
*** Bug 23554 has been marked as a duplicate of this bug. ***
I do not see making it a login shell as the solution, it is supposed to be an interactive shell. The solution must be in fixing ~/.bashrc. /etc/skel/.bashrc sets the PROMP_COMMAND to something similar as PS1 in /etc/profile. Apart from the fact that it doesn't seem to work as advertised in the manpage, it doesn't make sense. Why not just do an export PS1=whatever in ~/.bashrc and /etc/skel/.bashrc?
Sorry didn't realize the PROMPT_COMMAND in .bashrc is used to set title of console...
*** This bug has been marked as a duplicate of 26952 ***