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

Re: Xsession and login shells

Marc Wilson wrote:
> Bob Proulx wrote:
> > Xsession does not spawn a login shell.
> Why should it?

* Because it provides the most user convenient way for the user to log
  in and have their login environment.

* Because not doing so has been a long term problem for users.

* Because not doing so causes there to be a difference between logging
  in with xdm versus logging in with ssh.

* Because this is a needless distro difference and it would be useful
  to converge on behavior.

> There's no shell running.

When the user starts a terminal window, such as an xterm, then the
shell is running at that time in that window.  But even if I launch a
graphical, non-terminal, application I will want that application to
have my login environment available to it.

> If the user is starting X from a console prompt, then their
> environment is already initialized,

Agreed.  In those cases the user's profile will be sourced again.
That is a very small penalty.  Avoiding that is not an optimization
that I think is good to make.  It does no harm.  Compared to the time
it takes X to load and initialize the time penalty is insignificant.

User's who log in with text mode and then start X tend to be the more
advanced, long time unix users.  They are also the ones who know
better the workings of the system and are not as troubled by these

> and if they're using a display manager, then it's the display
> manager's problem if it wants to source environment variables (which
> is what this is really about),

Agreed again.  That is exactly the point of this.  When a user logs
into a graphical login session they expect their environment to be
sourced.  Currently it is not.  Currently a user must know to create a
~/.xsession file with '#!/bin/bash --login' or whatever for their
shell in order to load their login environment.

I am going to ignore your subtle point that [gkx]dm is not the same as
Xsession.  To the user logging in they can't tell the difference.

> not that the display manager has any business doing it either.

Why should logging in with a graphical login manager be different than
logging in with ssh?

> And yes, I've read the bug you point to.  I don't agree with it.

That is always your prerogative.  Do you have an alternative
suggestion?  I am interested in any and all options.

> If the user wants a particular set of environment variables, then
> their ~/.xsession should source $ENV (or the csh equivalent, which I
> dis-remember).

But this is also something that only a more advanced Debian user knows
to do.  And if you are not running Debian then you don't need to do
this since other distros do load your login environment.  If you were
to compare two distros side by side this really looks like breakage in

The proposed change does not make it more difficult for an advanced
user.  But leaving it as it is today does keep it more difficult for
the typical user.

Can anyone think of alternatives?  How can we solve this problem for
our users?


Attachment: pgpSmkTUfhKis.pgp
Description: PGP signature

Reply to: