/etc/environment not being read in Lucid

Bug #524761 reported by Jane Atkinson on 2010-02-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxde-common (Ubuntu)
Undecided
Unassigned
lxdm (Ubuntu)
High
Julien Lavergne

Bug Description

When I boot up, the /etc/environment file isn't being read, meaning that the default $PATH variable is very short, and any other items that I've added don't get added to the environment.

This is happening on my EeePC 900 which is running Lucid with lxde and openbox. It's not happening on my Toshiba Satellite A10 which is running Xubuntu. Therefore, I suspect that it's something to do with lxde/openbox.

My current workaround for this is to add a file, 98environment, to the /etc/X11/Xsession.d directory. Adding lines to /etc/rc.local didn't work.

Jane Atkinson (irihapeti) wrote :

Update:
I made another experimental installation with openbox only, and /etc/environment was read successfully. Then I removed all lxde elements from the main installation, with the exception of lxterminal, which does not depend on any other lxde files, plus my temporary 98environment script mentioned above. /etc/environment is now being read successfully in this installation as well.

Therefore, it seems to me that the source of the problem lies somewhere in the lxde libraries.

Charlie Kravetz (charlie-tca) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in lxde.

When reporting bugs in the future please use apport, either via the appropriate application's "Help -> Report a Problem" menu or using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: ubuntu → lxde-common (Ubuntu)
Julien Lavergne (gilir) wrote :

Thanks for your bug report.
Could please tell us what login manager do you use ? gdm (the default on Ubuntu and Xubuntu) or lxdm or another one (or any) ?

Jane Atkinson (irihapeti) wrote :

@Julien Lavergne
I've been experimenting with lightweight installations built up from a command-line install. I have been using lxdm, xdm, qingy and sometimes no login manager.

I did some further experimentation, namely installing lxdm with no-recommends on an openbox-only install, and the same problem appeared. I've just found that qingy creates the same or a similar problem, so I've removed it. (I imagine, though, that this would be outside of your area of concern.)

So, essentially, the problem of /etc/environment not being read occurs when I have lxde-core/lxde-common or lxdm (or qingy) installed.

Jane Atkinson (irihapeti) wrote :

@Julien
I need to clarify what I wrote. lxdm can be installed but not the active login manager, and /etc/environment is read correctly. It is only when it is the default/active login manager that the problem arises.

Julien Lavergne (gilir) wrote :

I will have a fix for lxdm shortly. But, if you are not using a display manager, I don't think it's a bug in lxde-common, because it doesn't set the PATH. For example, if you are using a script to login, it should be a bug in the script.

Changed in lxdm (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Julien Lavergne (gilir)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxdm - 0.2.0~svn2307+git20100209-0ubuntu2

---------------
lxdm (0.2.0~svn2307+git20100209-0ubuntu2) lucid; urgency=low

  * debian/patches/15-path-replace.patch : From upstream, don't let lxdm
    replace PATH (LP: #524761).
  * debian/lxdm.upstart: export PATH from /etc/environment.
  * debian/patches/20-stderr_stdout_to_log.patch: From Sidux, redirect stderr
    and stdout to the log file.
 -- Julien Lavergne <email address hidden> Wed, 24 Feb 2010 23:51:29 +0100

Changed in lxdm (Ubuntu):
status: In Progress → Fix Released
Jane Atkinson (irihapeti) wrote :

@Julien
These are the results of my own tests:

lxdm installed --no-recommends is now allowing $PATH to be read from /etc/environment.

lxde-core/common installed with the --no-recommends option is now allowing $PATH to be read from /etc/environment, both with and without lxdm installed.

I'm not sure what happened earlier to cause me to think that there was a problem with lxde on its own. I wasn't using fancy login scripts to login without a desktop manager - just "startx". Maybe a stray configuration file that I hadn't removed was the culprit, though that's only a guess.

Anyway, all is working properly now.

Julien Lavergne (gilir) wrote :

Thanks for the feedback, so I closing the one for lxde-common.

Changed in lxde-common (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers