← Back to team overview

desktop-packages team mailing list archive

[Bug 1482641] Re: Lightdm (and GDM) source .profile as bash, indirectly sourcing .bashrc


This bug was fixed in the package gdm - 3.16.2-0ubuntu2

gdm (3.16.2-0ubuntu2) wily; urgency=medium

  * debian/patches/ubuntu_config_error_dialog.patch:
    Prevent that ~/.bashrc is sourced when ~/.profile is sourced
    (LP: #1482641).

 -- Gunnar Hjalmarsson <gunnarhj@xxxxxxxxxx>  Fri, 07 Aug 2015 17:23:00

** Changed in: gdm (Ubuntu)
       Status: In Progress => Fix Released

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

  Lightdm (and GDM) source .profile as bash, indirectly sourcing .bashrc

Status in gdm package in Ubuntu:
  Fix Released
Status in lightdm package in Ubuntu:
  In Progress

Bug description:
  The fix for https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/678421
  leads to `.profile` being sourced by bash instead of dash. This leads
  `.bashrc` being sourced indirectly via .profile. IMHO, `.bashrc`
  should not be sourced even *once* in this situation. I suggest that
  sourcing .profile actually be done with BASH_VERSION unset:


  At the very least, a check should be done whether bash is the user's
  login shell. It can  be done thus:

      [ "$SHELL" != "/bin/bash" ] && BASH_VERSION=
      . "$CONFIG"

  utilizing `$SHELL` given it stores the login shell

To manage notifications about this bug go to: