The /etc/profile and thus the /etc/profile.env gets executed before (that's ok) and after (!!) the execution of a user's .bash_profile. If the user made change to $PATH in his .bash_profile, these changes are lost as they are overwritten by the PATH in /etc/profile.env (generated by env-update) This problem only occurs in a KDE session. No problem in gnome or Xsession. Reproducible: Always Steps to Reproduce: 1. create a $HOME/.bash_profile containing the line: PATH=$PATH:$HOME/bin 2. log on with this user in a KDE session 3. open an xterm and: echo $PATH Actual Results: echo $PATH does not show the $HOME/bin Expected Results: KDE should not execute /etc/profile after the standard /bin/bash behaviour, excuting /etc/profile first and then .bash_profile Only for /bin/bash + kde session Workaround: put the line PATH=$PATH:$HOME/bin in the .bashrc file an not in the .bash_profile
Normally kde does not execute /etc/profile or .bash_profile at all. (please correct me if I'm wrong). /etc/profile is sourced before kdm, so there is some kind of path. However nowhere a login-shell is started so no .bash_profile is sourced (or /etc/profile). Kde itself has NOTHING to do with any bash (or any other shell) specific initialisation file. It only can start bash either normally or with --login, if you use konsole you can specify a flag to have it start a login shell.
Ok, I investigated the problem more thoroughly. The /usr/kde/3.1/bin/startkde shell script starts with #!/bin/sh --login I changed it to #!/bin/sh and this fixes the problem. Additional remarks: 1) the /etc/X11/xdm/Xsession executed before startkde already starts with #!/bin/bash --login This is indeed needed. 2) /etc/X11/xdm/Xsession contains the following test: if [ -n "`/etc/X11/chooser.sh`" ] then exec "`/etc/X11/chooser.sh`" It would be a good to change this to, as follows to avoid executing chooser twice : if [ -n "/etc/X11/chooser.sh" ] then exec "`/etc/X11/chooser.sh`" (Note: that the backquotes are not needed in the -n test)
See bug #23297 for information on why this is done.
Things changed a lot since then, I think this should not be an issue anymore. Reopen if I'm wrong.