Tim Connors said: > Christian Riedel <[EMAIL PROTECTED]> said on Thu, 17 Jun 2004 18:28:54 > +0200: >> Hi, >> >> On 17.06.2004 15:40, Freivald, Joseph A, GVSOL wrote: >> > /etc/X11/Xsession.d > cat 98login-shell-settings >> > # Debian specific environment settings >> > source /etc/environment >> > # Global settings just like for login shells >> > source /etc/profile >> >> This does the job quite well. And people who dont want a login-shell >> when starting X simply dont install the script. >> >> In my oppinion this should comfort both sides.
Conceptually though this is a hack. It doesn't source ~/.bash_profile and you cannot add it or non-bash shells will attempt to source it. The correct fix is to change the file: /etc/X11/Xsession.d/99xfree86-common_start to read: exec -l $SHELL -c "$STARTUP" That way the initial environment is delegated to the user's default shell. > Although, I hope you never do this on a machine you sysadmin where you > have other people using it. > > I have to contend with a stupid SuSE system at work where the > /etc/profile* scripts are so absolutely full of cruft Well we're not talking about SuSE. Debian /etc/profile set's PATH and PS1 and that's it. > (and cruft that > actually sets undesirable behaviour in some thing - I think the LESS > environment variable was set to something about 80 columns long) that > they take quite some time to execute. Not only that, they don't care > about overriding variables that are already set -- I start up my > xterms with bash as a login shell Then it's ironic that you complain about inefficencies in /etc/profile because starting all of your xterm's as login shells will source the /etc/profile and ~/.bash_profile every single time whereas doing it once when you actually *login* will allow all shells to simply inherit what was already set. > The correct place to put in all of this cruft that not everybody will > want is in the skeleton directory, so they can remove or edit the > files once they are installed in their home direcory. I tried to > suggest this to SuSE, but alas my bugreport of course went completely > unnoticed. And with good reason. A good sysadmin doesn't force the responsibility of administering the system to the users. Anything like JAVA_HOME, http_proxy, etc belongs in /etc/profile or on SuSE /etc/profile.local. Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

