[comp.windows.x] Xdm and login files

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (06/14/90)

    If a user logs in through Xdm, when is the user's .login or .profile files
    executed?

Only when explicitly requested by the user's .xsession (unless someone has
modified what the overall Xsession does at your site), e.g. by reading it
directly in the .xsession or starting up an xterm with -ls.

    What is the usual scenario for getting this accomplished, if the
    first shell that they see in an Xterm window is not a login shell.

I'd say it's probably best to read it directly in the .xsession, before
starting up any other clients.

    Do you have to force the first xterm to be a login shell with the -ls
    command?

You can use -ls to read .login/.profile, but you don't have to do it that way.
If all you ever do in your .xsession is start a single xterm, then using -ls
is the easiest way.  If you do anything else, then typically you want the
results of your .login/.profile to apply to all commands you execute in the
.xsession (e.g., you want any environment variables or search path to propagate
to all xterms and other programs you start up).  In that case, you would read
the .login/.profile explicitly as an initial step in your .xsession, before
doing anything else.  Now, if your .login/.profile has a potential for asking
a question (e.g., if it has an always-querying tset command in it), you'll want
put in some way to avoid that.