On 03-09-2014 13:04, Bruce Dubbs wrote: > akhiezer wrote: >>> From: Christopher Gregory <[email protected]> >>> To: [email protected] >>> Date: Wed, 03 Sep 2014 17:03:46 +1200 >>> Subject: Re: [blfs-dev] LXDM: localization fixed but runlevel two >>> different >>> fixes [Was Re: ... bootscripts: . blfs/init.d] >>> >>> On Tue, 2014-09-02 at 20:05 -0300, Fernando de Oliveira wrote: >>>> Fixed at revision 14177. >>>> >>>> Thanks Armin and Bruce. >>>> >>>> Armin, I could not use your suggestion (my preferred one), because each >>>> time an x-terminal emulator started, several error messages about not >>>> finding patappend and pathremove appeared in the newly open terminal.. >>>> >>>> I recall that they used to be unset, and is not anymore, thought it was >>>> /etc/profile that unset it, but was not. If I could find how to avoid >>>> this problem, I would replace the fix I put in the book, and don't >>>> like, >>>> by yours. >>>> >>>> -- >>>> []s, >>>> Fernando >>> >>> Hello Fernando, >>> >>> I have added this to my ~/.bashrc >>> source /etc/profile >>> >> >> >> (Hmmm. Depends of course on how are the startup files organised. Some >> folks chain: >> { /etc/profile (+) /etc/profile.d/ } >> -- { ~/.profile | ~/.bash_profile | ~/.bash_login} > > The order here is defined by bash and ~/.profile is the last option. > Also the syntax might be confused as a pipe. The actual sequence is: > > if [ -e ~/.bash_profile ]; then source ~/.bash_profile; > elsif [ -e ~/.bash_login ]; then source ~/.bash_login; > elsif [ -e ~/.profile ]; then source ~/.profile; > fi > >> -- { ~/.bashrc } > > Depends if it's a login shell or not. Of course is can be explicitly > sourced from ~/.bash_profile. etc. > >> -- { /etc/bashrc } > > Only used if explicitly called from another file (e.g. ~/.bashrc). > >> ; and at most perhaps call some parts of /etc/profile.d/ from the bashrc >> stuff. But yes, I know that you're talking about what worked for you >> here. > > The things that need to be set from ~/.bashrc are aliases and PS1. The > other unusual possibility is non-exported shell variables. ~/.bashrc is > only automatically sourced for interactive subshells. > > If the profile files are set up properly, then /etc/profile should only > be called once at login. The issue is to make sure ldxm or other dm > does indeed run it. > > -- Bruce
Bruce, thank you very much for correcting me about the runlevel in the patch. I knew about that, but this was the first time that I needed to be careful about it, and was reckless. akhiezer, thanks for the interest. I am still investigating about how and where /etc/profile is being sourced, but until now, I suspect that the DM does not do it, it is done by the session manager. I am naming like that, because it can be OpenBox, LXDE, etc. And that is the reason lxdm script seem to only deal with LANG, either by i18n or by testing the env variable itself. -- []s, Fernando -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
