[187] in athena10
Re: System Dotfiles (was Re: /svn/athena r22913
daemon@ATHENA.MIT.EDU (Timothy G Abbott)
Fri Apr 25 02:46:56 2008
Date: Fri, 25 Apr 2008 02:46:11 -0400 (EDT)
From: Timothy G Abbott <tabbott@MIT.EDU>
To: Greg Hudson <ghudson@mit.edu>
cc: athena10@mit.edu
In-Reply-To: <1209049502.5864.124.camel@error-messages.mit.edu>
Message-ID: <Pine.LNX.4.64L.0804241240380.15855@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Thu, 24 Apr 2008, Greg Hudson wrote:
>> - Whether we want to set the noclobber option. I think we don't.
>
> Ambivalent, tending towards disagreement. Changing from a safer default
> to a less safe one is worrisome, even if we never had the right to
> choose that default initially. It's easy to turn off for those who
> don't like it so I don't see a lot of benefit to changing this.
One idea would be to change it for bash, but not for tcsh, and use that as
the migration path.
>> - Whether we're intending to switch the default shell away from tcsh.
>> I think we should.
>
> Per prior discussion, I am willing to do a phased transition to bash if
> documentation and support are willing to deal with the two different
> classes of users. My previous impression was that this burden was
> unacceptable to them, but based on Jonathan Reed's response that might
> not be the case.
>
> We would need to fix the current major problems with bash support first.
> Right now the xsession is always executed under tcsh, which means (1)
> your .cshrc.mine and .environment get used for graphical logins even if
> you're a bash user, (2) there is no global .bash_environment setup for
> graphical logins, (3) .cshrc.mine is the only way to get "skip"
> variables and the like to affect xsession behavior, and and
> (4) .startup.X is always executed under tcsh and has no bash equivalent.
> Right now bash users typically create their own .xsession scripts to
> work around this lossage.
>
> (Also, .startup.tty is currently executed with whichever shell you use,
> which isn't in keeping with the other dotfiles where different names are
> used for the bash ones. This isn't an issue for changing the default
> shell, and may be tolerable.)
>
> The most straightforward solution is to fork xsession into bash and tcsh
> versions and make /etc/athena/login/Xsession decide which one to use
> based on the user's shell. This isn't really ideal since xsession is a
> big script, but I'm willing to accept it at this point. The alternative
> is a bit more intricate: make the majority of xsession a /bin/sh script
> which gets executed from a shell-dependent wrapper. The wrapper sources
> the user's dotfiles and sets environment variables based on the "skip"
> variables in the tcsh case (in the bash case users can be told to set
> environment variables directly). The main xsession script would
> execute .startup.X (or perhaps the renamed bash one if we go that route)
> in a subprocess using the user's shell.
>
>> - Whether to change their API so that they are included from
>> /etc/bash.bashrc (or whatever) rather than the user's ~/bashrc file.
>
> No objection in principle. My main concern is that this would make it
> harder to deliberately not use the Athena dotfiles, and would cause the
> Athena dotfiles to infiltrate and possibly break local accounts which
> are currently kept alone.
>
> Users who have chosen not to use the Athena dotfiles in their Athena
> homedirs are considered to be on their own from a support point of view,
> but we should at least make it easy for them to turn off the Athena
> behavior in Athena 10 (or whenever we introduce this.)
This can by having the system dotfiles check a file in the user's home
directory that can be used for such an override.
> Local accounts could be handled by having the Athena dotfiles do nothing
> for homedirs not beginning with /mit, perhaps.
We can use the DEBATHENA_HOME_TYPE environment variable (set by
pam_debathena_home_type, and initially setup for avoiding messing with
gconf paths for local accounts) to test whether their home directory is
local. It tests "is in AFS", rather than "starts with /mit", but I think
that's what you want anyway.
I'm increasingly convinced that the best way to solve a lot of these
problems might be to keep the tcsh dotfiles almost completely unchanged,
but fix the bash dotfiles to work how we want dotfiles to work in the
future.
-Tim Abbott