[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Login Shell/Profile: Stop the Madness



Christian Riedel <sarek@nurfuerspam.de> 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.

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 (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, because I want ~/.bash_logout to be
executed (it would be quite nice if bash had a ~/.bash_exit file that
was executed analagously to ~/.bashrc instead of ~/.bash_profile), and
then I have to unset everything that SuSE just set for me.

The worst thing about all this, is the big warning banner at the top
of /etc/profile:
# /etc/profile for SuSE Linux
#
# PLEASE DO NOT CHANGE /etc/profile. There are chances that your changes
# will be lost during system upgrades. Instead use /etc/profile.local for
# your local settings, favourite global aliases, VISUAL and EDITOR
# variables, etc ...

What kind of absolutely broken stupid system has a file that can't be
overridden by the non-priveleged user full of unweildy amounts of
settings, and then doesn't let the sysadmin remove the cruft,
threatening to reinstate it upon an upgrade? Of course, /etc/profile
-- that file that can't be overridden -- decides to source everything
in /etc/profile.d/* - which are all installed by all the packages
installed on the system - another thing that can't be overriden by
non-priveleged users.

I'm afraid this seems to correlate well to the quality of the rest of
SuSE though -- pity I have to use it :(

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.

-- 
TimC -- http://astronomy.swin.edu.au/staff/tconnors/
Q: Vodka, barbeque, pizza, beer - which is essential for the
post-modern coder?
"Dependink on how you mean? Liquid, solid or gas? " -- Pitr/User Friendly



Reply to: