screwed up $PATH

while ago, all of a sudden my $PATH was totally hammered and I didn't know why? but the signs were ifconfig reboot halt and common command in terminal returned the same error "command not found". I was without clue as what effect the $PATH. while all of the common places which PATH could be defined were normal and nothing to dictate the new $PATH.My consult in IRC led nowhere and everybody ignored me there.at the end i re-install the arch again but now I have the same problem all over again. now I checked and recheck but all the same. but while I checked deeper i found that in TTY all thing are normal for example the reboot will restart and Ifconfig will report back.and the problem was I installed LightDM in both casesand after that my $PATH was gone.HOW could I fix the $PATH???

Re: screwed up $PATH

I know nothing about lightDM, but your PATH is set by various login scipts -- It starts with /etc/profile, then,It runs all the scrips in /etc/profile.d. Check that none of them are mucking with the paththen, depending on what you are doing, other startup and login scrips can change it. This can occur in .bashrc, .zshrc, .xinitrc, etc...

Find out what lightdm is running at login and check those scripts. Also, check that /etc/profile is what you expect. If it is, rerun that script and see if things improve. If they do, it happens in one of the later scripts

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael FaradayYou assume people are rational and influenced by evidence. You must not work with the public much. -- Trilby----How to Ask Questions the Smart Way

Re: screwed up $PATH

One last thought as I head off to bed (00:05 here): Use the -Ql option with pacman to find out what files it has installed. Look for the ones that mess with PATH.

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael FaradayYou assume people are rational and influenced by evidence. You must not work with the public much. -- Trilby----How to Ask Questions the Smart Way

Re: screwed up $PATH

guys i emailed Robert Ancell and he says "LightDM uses a default PATH /usr/local/bin:/usr/bin:/bin which isoverridden by PAM if it is configured that way (it is in Ubuntu)." does it help in $PATH issue?

Re: screwed up $PATH

Hence the $PATH problem, I wrote back and force with the Robert Ancell the developer of the LightDM project bout the cause of the problem and how to solve it.Robert replied; "LightDM uses a default PATH /usr/local/bin:/usr/bin:/bin which is overridden by PAM if it is configured that way (it is in Ubuntu). " so the investigation of the case leed us to this."but LightDM simply sets a default PATH like every other display manager (gdm/kdm/xdm etc.) for the session. You still haven't told us what distribution/OS you're actually usingbut if you want a different PATH for the session you are free to override it in the session wrapper script or via PAM as with any other display manager."and"change PATH in the session wrapper script, i.e. the script that's referenced by the session-wrapper option in lightdm.conf."[BOLD]the problem is that what is session wrapper for arch and where is it?[/BOLD]as the project manager pointed it outchange PATH in the session wrapper script, i.e. the script that's referenced by the session-wrapper option in lightdm.conf.but there is non to my knowledge present.what lightdm project manager suggested was " it is usually a shell script which sets up your session andstarts the windowmanager or desktop environment, so you could addexport PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"in an appropriate place."Note that this script is not part of LightDM, it is your distributions responsibility to provide such a wrapper script and to configure LightDM to use it. If that's not the case I wouldfile a bug against your distros LightDM packageSo How should we proceed?

-Start lightdm normally and login. It should pick up the right environment variable. I haven't tested it to a great extend though, and maybe it works without ck-launch-session.

Hi, everyone,I need your help. I tried the session wrapper and it works. However, it block the regular user(no root) to shutdown/reboot/suspend/hibernate from the logout panel in xfce4.The panel just show log out button , the shutdown/reboot/suspend/hibernate buttons became gray and unable to click. After I commented the session wrapper line in lightdm.conf, the log out panel return to normal. Is there any better methods to source /etc/profile? THANKS!

Change the Name= field to something other than Xfce Session ( i just set it as my username)Change the Exec= field to /home/<<USERNAME>>/.xinitrc(Of course you could do as Wey has suggested and create a global xinitrc)Save the file.

Change the Name= field to something other than Xfce Session ( i just set it as my username)Change the Exec= field to /home/<<USERNAME>>/.xinitrc(Of course you could do as Wey has suggested and create a global xinitrc)Save the file.