Xsession.d script assumes that /sbin is in $PATH
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
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/
The mechanism is the following:
1. /usr/sbin/
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
Related branches
description: | updated |
description: | updated |
tags: | added: patch |
Changed in upstart (Ubuntu): | |
status: | In Progress → Fix Committed |
Hi Johannes, thanks for your report.
I'm the one who proposed the use of /bin/bash, so I'm kind of disinclined to agree on switching back. ;) There were valid reasons for making that change.
Can't help thinking that you ask for trouble by excluding /sbin from $PATH, but possibly it's not just a mistake.
Other ways, besides those you mention, to deal with this bug might be:
* Change the upstart files so they call the upstart bin with full path.
* Add some condition to the .profile file in /etc/skel so it does not askubuntu. com/questions/ 591937 )
source ~/.bashrc when sourced by a DM.
( Got that idea from http://
Subscribed Martin Pitt, who helped out with bug #678421.