@Myself: in my description I repeatedly used "interactive shell" when I
meant "login shell" instead.  The distinction is important, (and thus
the shell makes the distinction)--the user's .profile is only sourced in
the latter case.  On all other interactive shells it sources .bashrc
instead.  This is so that .profile can initialize the user's terminal
settings, whereas this should NOT be done for all other interactive
shells.

@Anders: it need not be .bashrc, and I explicitly addressed the case
where your shell was not BASH.  It seems you did not read the whole
report.

@Gunnar:  So your argument is basically, "This is designed wrong, but we
shouldn't fix it, because some people might have to learn the right way
to do it."  That is a pretty bad argument.  The "mess" is that some
percentage of users *might* need to modify their shell start-up files to
do it the right way.  That doesn't seem like much of a mess to me; it's
fixing a mess.

It seems clear to me that .profile and the other shell start-up files
belong to the shell, and hence no program other than the shell has any
business reading them.  Regardless, if you don't care to fix this,
what's your proposed fix for lightdm barfing on errors from terminal
commands that quite rightly belong in .profile?  At the very least,
session start-up should not be interrupted by the fact that lightdm does
this badly.   That behavior is a regression, in the sense that Ubuntu
12.x did not do this until some random update somewhere between six
months and a year ago, and no previous Ubuntu release did it.  I have
not run a pristine 14.04 Ubuntu--I've only been running it for a couple
of months with all current updates applied, so I can't say whether it
has or has not changed there.

In the past, some distributions (including Ubuntu, if I'm not mistaken)
have sourced $HOME/.profile in the system Xsession script.  That
solution is wrong too; but it has the nice property that if there are
errors caused by the shell not running on a terminal, they are silently
ignored (since there's nowhere to send them).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1468832

Title:
  lightdm sources .profile

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1468832/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to