Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a spurious path in my ~PATH~ environment variable in Ubuntu:

/usr/lib/lightdm/lightdm

I have no idea where it is set. I have checked these files:

/etc/environment
/etc/profile
/etc/profile.d/*
/etc/bash.bashrc
~/.bash_profile
~/.bashrc
~/.profile
~/.pam_environment

Any idea where else it can be or how can I find it?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

I cannot find out, where it is set, i is not in /etc/skel, too, nowhere in /etc and nowhere in /home/. But I found out, why it is set. I also started bash with -x to see, what happens, but the only thing I can see there is

complete -F _service /etc/init.d/lightdm

and I cannot find references to PATH or set there (No wonder, the initscript has been converted to an upstart job). But, to calm you, this is default behaviour in Ubuntu.

share|improve this answer
add comment

Notably missing from the list is ~/.bash_profile. I recommend checking there (if you have not done so).

This file doesn't always exist, and it's not a problem when it doesn't. However, if it does exist, it is executed by initial login shells instead of .profile. (So if it doesn't itself run or source .profile, .profile will not run at all.)

That's just in bash of course. .bash_profile is ignored by other shells--it's a good place to put commands that are bash-specific (so long as you make sure to source .profile in it if there's code there that needs running).

For more information on startup scripts, see man bash.

share|improve this answer
    
I don't have this file at all –  rowman Jan 23 '13 at 10:00
    
@rowman In that case, that's not it. (Edited to generalize for others.) –  Eliah Kagan Jan 23 '13 at 10:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.