From: tmcconne@sedona.intel.com (Tom McConnell)
Newsgroups: comp.windows.x.apps
Subject: Re: Running .login under XDM
Date: 31 Jul 92 15:38:21 GMT
Reply-To: tmcconne@sedona.intel.com
Organization: Intel Corporation
Originator: tmcconne@sedona


In article <22628@hacgate.SCG.HAC.COM>, crussell@samson.hac.com (Chris Russell) writes:
> In article 92Jul22183445@splinter.coe.northeastern.edu, ratinox@splinter.coe.northeastern.edu (Richard Pieri/Stainless Steel Rat) writes: 
  <stuff deleted>
> > 
> > You should move everything that is shell-dependant from your .login file to
> > your .cshrc file.
> 
> Hummm, your opinion is contrary to my understanding.  Granted, the .login file
> is used to configure your terminal, but it is also ment to configure your
> environment (ie: Unix environment variables).  These environment variables are
> passed down when a new process is forked.

  Consider also, the "terminal" that would be configured if .login was the only
source of terminal setups would be the initial xterm for an X environment. Only
the environment stuff would go to new xterms (assuming the window manager was
started after .login. Which is where the xdm question came from in the first
place :).

> 
> On the other hand, C shell variables (as opposed to Unix environment variables)
> are NOT passed down and must be re-established by running the .cshrc script.
> That is why the .cshrc must contain all shell-specific configurations (ie: set,
> alias, etc) while the .login should contain session-specific configurations
> (ie: setenv, stty, etc).
> 
> To place everything in the .cshrc script would unnecessarilty lengthen it's size
> and consequently extend the time it takes to fork a new shell.

  Exactly! This is the basis for the way my .cshrc and .login are set up. If a
large number of environment variables are set in .cshrc (significantly slowing
down starting a new process), I generally use an environment variable as a flag.
If the flag is set, I do not set the other "environment" variables, just the
aliases and other transient shell stuff. This can be a significant savings in
time for starting a new process for us.

> 
> This is my understanding from practice, the standard .login/.cshrc scripts from
> Sun, and several texts on the C shell.
> 
> Chris Russell.
> Hughes Training Inc, WCO

  I realize that "comp.windows.x.apps" is not exactly the right place for this,
but I would like to conduct a small poll of X users:

       1. What do you use (what is in) .login for?

       2. What do you use (what is in) .cshrc for?

       3. What do you use (what is in) .xinitrc for?

       4. What do you use (what is in) .xsession for?
 
  If you would like to reply, please use email to tmcconne@sedona.intel.com. If
there is sufficient (any :) interest, I can post a summary.

  This has become a rather large issue at my site, where several hundred people
are affected by an overloaded network and huge .cshrc files.

  Thanks for any interest.

    Cheers,

    Tom McConnell
-- 
 Tom McConnell          |     Internet: tmcconne@sedona.intel.com
 Intel, Corp. C3-21     |     Phone: (602)-554-8229
 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
 Chandler, AZ  85226    | their right mind would claim them.
Newsgroups: comp.windows.x.apps