Terminal Profile Strangeness with KDE4.2
I'm not sure if this is Slack specific, but I thought I'd start here.
I'm noticing some differences in the way the /etc/profile and /etc/profiles.d/* are being executed in Slack 12.2 with Pat's kde4.2 "upgrade" from /testing.
I always make one small change to /etc/profile, to change the prompt.
Now, here's what appears to be happening:
On a "native" term, it looks like /etc/profile is run, which in turn runs the contents of /etc/profile.d/*.sh. I get my "modified" prompt, and fortune only runs once.
When I open a term, from the kde4 "start" menu, it appears that /etc/profile is run, because again, I see my "modified" prompt. But, the contents of /etc/profile.d/*.sh are run twice. It's entirely possible that /etc/profile is run twice.
If I log out of kde4.2, with a terminal open, and then log back in, then when kde4.2 starts and re-opens the terminal, this time the contents of /etc/profile.d/*.sh are only run a single time, but my "modified" prompt is not set, so it looks like /etc/profile is not run. Also, this shell starts in ~/Desktop, instead of "home".
***** Update *****
Ignore the comment about the shell starting in ~/Desktop. It appears that the shell restarts in the same directory it was when the previous session ended.
As an experiment, I removed the /etc/profile modification, and added it as another script in /etc/profile.d/*.sh. When this was done, there was NO change in the final scenario. Also, I noticed that the prompt is the "default" prompt: bash-3.1. From this, I can conclude that when the shell is re-started this way, neither /etc/profile, nor the /etc/profile.d/*.sh scripts are executed. So, what scripts ARE used.
Last edited by MQMan; 02-26-2009 at 08:01 PM.
Reason: Update information