← Back to team overview

desktop-packages team mailing list archive

[Bug 1435492] Re: Xsession crash after login (fix for #678421 breaks)


When I was young I've been taught that the sbin dirs are not supposed to
be in the user's $PATH, but only in the superuser's. (the "s" in /sbin
stands for "superuser"). Usually in the sbin dirs are only tools you
need for sysadmin tasks. So it is a good idea not to have it in the
$PATH of an ordinary user.

I also doubt a little bit about changing /etc/skel/.profile as this
would only affect new added users. All the already existing user
accounts have their ~/.profile in their $HOME. That wouldn't be affected
by changing /etc/skel/.profile

A solution I just tested is to unset BASH_VERSION in /usr/sbin/lightdm-
session. Then standard ~/.profile wouldn't source .bashrc. I don't know
if this has side effect though.

** Attachment added: "tested patch"

You received this bug notification because you are a member of Desktop
Packages, which is subscribed to lightdm in Ubuntu.

  Xsession crash after login (fix for #678421 breaks)

Status in lightdm package in Ubuntu:

Bug description:
  According to changelog.Debian from version 1.12.3 on lightdm is using
  "bash for the session to improve error handling" to fix #678421.

  Unfortunately this can break the session start up when the user sets
  the $PATH environment variable in ~/.bashrc. Then /sbin might no
  longer be in $PATH and /etc/X11/Xsession.d/99cadence-session-start
  won't find /sbin/upstart when calling "upstart --user"

  The mechanism is the following:

  1. /usr/sbin/lightdm-session lines 37-42 source among others

  2. The usual .profile of /etc/skel will source ~/.bashrc if the shell
  is Bash (and not /bin/sh)

  3. ~/.bashrc (maybe) is setting $PATH without /sbin

  4. upstart --user call fails as /sbin is not in $PATH

  Suggested solutions:

  * switch back to /bin/sh

  * make sure that /sbin is in $PATH

To manage notifications about this bug go to: